/[classpath]/classpath/java/net/Socket.java
ViewVC logotype

Diff of /classpath/java/net/Socket.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.22 by mkoch, Sat Dec 21 11:42:37 2002 UTC revision 1.23 by cbj, Fri Jan 10 17:07:01 2003 UTC
# Line 95  public class Socket Line 95  public class Socket
95     * might want this behavior.     * might want this behavior.
96     *     *
97     * @specnote This constructor is public since JDK 1.4     * @specnote This constructor is public since JDK 1.4
98       * @since 1.1
99     */     */
100    public Socket ()    public Socket ()
101    {    {
# Line 122  public class Socket Line 123  public class Socket
123     *             <code>Socket</code>     *             <code>Socket</code>
124     *     *
125     * @exception SocketException If an error occurs     * @exception SocketException If an error occurs
126       *
127       * @since 1.1
128     */     */
129    protected Socket (SocketImpl impl) throws SocketException    protected Socket (SocketImpl impl) throws SocketException
130    {    {
# Line 180  public class Socket Line 183  public class Socket
183     * exists and does not allow a connection to the specified host/port or     * exists and does not allow a connection to the specified host/port or
184     * binding to the specified local host/port.     * binding to the specified local host/port.
185     * @exception IOException If a connection error occurs.     * @exception IOException If a connection error occurs.
186       *
187       * @since 1.1
188     */     */
189    public Socket (String host, int port,    public Socket (String host, int port,
190                   InetAddress localAddr, int localPort) throws IOException                   InetAddress localAddr, int localPort) throws IOException
# Line 200  public class Socket Line 205  public class Socket
205     * @exception IOException If an error occurs     * @exception IOException If an error occurs
206     * @exception SecurityException If a security manager exists and its     * @exception SecurityException If a security manager exists and its
207     * checkConnect method doesn't allow the operation     * checkConnect method doesn't allow the operation
208       *
209       * @since 1.1
210     */     */
211    public Socket (InetAddress address, int port,    public Socket (InetAddress address, int port,
212                   InetAddress localAddr, int localPort) throws IOException                   InetAddress localAddr, int localPort) throws IOException
# Line 396  public class Socket Line 403  public class Socket
403     * is not connected, then <code>null</code> is returned.     * is not connected, then <code>null</code> is returned.
404     *     *
405     * @return The local address     * @return The local address
406       *
407       * @since 1.1
408     */     */
409    public InetAddress getLocalAddress ()    public InetAddress getLocalAddress ()
410    {    {
# Line 521  public class Socket Line 530  public class Socket
530     * @param on true to enable, false to disable     * @param on true to enable, false to disable
531     *     *
532     * @exception SocketException If an error occurs or Socket is not connected     * @exception SocketException If an error occurs or Socket is not connected
533       *
534       * @since 1.1
535     */     */
536    public void setTcpNoDelay (boolean on)  throws SocketException    public void setTcpNoDelay (boolean on)  throws SocketException
537    {    {
# Line 539  public class Socket Line 550  public class Socket
550     * @return Whether or not TCP_NODELAY is set     * @return Whether or not TCP_NODELAY is set
551     *     *
552     * @exception SocketException If an error occurs or Socket not connected     * @exception SocketException If an error occurs or Socket not connected
553       *
554       * @since 1.1
555     */     */
556    public boolean getTcpNoDelay() throws SocketException    public boolean getTcpNoDelay() throws SocketException
557    {    {
# Line 567  public class Socket Line 580  public class Socket
580     *     *
581     * @exception SocketException If an error occurs or Socket not connected     * @exception SocketException If an error occurs or Socket not connected
582     * @exception IllegalArgumentException If linger is negative     * @exception IllegalArgumentException If linger is negative
583       *
584       * @since 1.1
585     */     */
586    public void setSoLinger(boolean on, int linger) throws SocketException    public void setSoLinger(boolean on, int linger) throws SocketException
587    {    {
# Line 602  public class Socket Line 617  public class Socket
617     * if SO_LINGER not set     * if SO_LINGER not set
618     *     *
619     * @exception SocketException If an error occurs or Socket is not connected     * @exception SocketException If an error occurs or Socket is not connected
620       *
621       * @since 1.1
622     */     */
623    public int getSoLinger() throws SocketException    public int getSoLinger() throws SocketException
624    {    {
# Line 675  public class Socket Line 692  public class Socket
692     * this option implies that there is no timeout (ie, operations will     * this option implies that there is no timeout (ie, operations will
693     * block forever).  On systems that have separate read and write timeout     * block forever).  On systems that have separate read and write timeout
694     * values, this method returns the read timeout.  This     * values, this method returns the read timeout.  This
695     * value is in thousandths of a second (****????*****)     * value is in thousandths of a second.
696     *     *
697     * @param timeout The length of the timeout in thousandth's of a second or     * @param timeout The length of the timeout in thousandths of a second, or
698     * 0 if not set     * 0 to indicate no timeout.
699     *     *
700     * @exception SocketException If an error occurs or Socket not connected     * @exception SocketException If an error occurs or Socket not connected
701       *
702       * @since 1.1
703     */     */
704    public synchronized void setSoTimeout (int timeout) throws SocketException    public synchronized void setSoTimeout (int timeout) throws SocketException
705    {    {
# Line 707  public class Socket Line 726  public class Socket
726     * if not set     * if not set
727     *     *
728     * @exception SocketException If an error occurs or Socket not connected     * @exception SocketException If an error occurs or Socket not connected
729       *
730       * @since 1.1
731     */     */
732    public synchronized int getSoTimeout () throws SocketException    public synchronized int getSoTimeout () throws SocketException
733    {    {
# Line 822  public class Socket Line 843  public class Socket
843     *     *
844     * @exception SocketException If an error occurs or Socket is not connected     * @exception SocketException If an error occurs or Socket is not connected
845     *     *
846     * @since Java 1.3     * @since 1.3
847     */     */
848    public void setKeepAlive (boolean on) throws SocketException    public void setKeepAlive (boolean on) throws SocketException
849    {    {
# Line 840  public class Socket Line 861  public class Socket
861     *     *
862     * @exception SocketException If an error occurs or Socket is not connected     * @exception SocketException If an error occurs or Socket is not connected
863     *     *
864     * @since Java 1.3     * @since 1.3
865     */     */
866    public boolean getKeepAlive () throws SocketException    public boolean getKeepAlive () throws SocketException
867    {    {
# Line 918  public class Socket Line 939  public class Socket
939     * Closes the input side of the socket stream.     * Closes the input side of the socket stream.
940     *     *
941     * @exception IOException If an error occurs.     * @exception IOException If an error occurs.
942       *
943       * @since 1.3
944     */     */
945    public void shutdownInput() throws IOException    public void shutdownInput() throws IOException
946    {    {
# Line 931  public class Socket Line 954  public class Socket
954     * Closes the output side of the socket stream.     * Closes the output side of the socket stream.
955     *     *
956     * @exception IOException If an error occurs.     * @exception IOException If an error occurs.
957       *
958       * @since 1.3
959     */     */
960    public void shutdownOutput() throws IOException    public void shutdownOutput() throws IOException
961    {    {
# Line 944  public class Socket Line 969  public class Socket
969     * Returns the socket channel associated with this socket.     * Returns the socket channel associated with this socket.
970     *     *
971     * It returns null if no associated socket exists.     * It returns null if no associated socket exists.
972       *
973       * @since 1.4
974     */     */
975    public SocketChannel getChannel()    public SocketChannel getChannel()
976    {    {
# Line 1032  public class Socket Line 1059  public class Socket
1059    
1060    /**    /**
1061     * Checks if the socket is connected     * Checks if the socket is connected
1062       *
1063       * @since 1.4
1064     */     */
1065    public boolean isConnected ()    public boolean isConnected ()
1066    {    {
# Line 1040  public class Socket Line 1069  public class Socket
1069    
1070    /**    /**
1071     * Checks if the socket is already bound.     * Checks if the socket is already bound.
1072       *
1073       * @since 1.4
1074     */     */
1075    public boolean isBound ()    public boolean isBound ()
1076    {    {
# Line 1048  public class Socket Line 1079  public class Socket
1079    
1080    /**    /**
1081     * Checks if the socket is closed.     * Checks if the socket is closed.
1082       *
1083       * @since 1.4
1084     */     */
1085    public boolean isClosed ()    public boolean isClosed ()
1086    {    {
# Line 1056  public class Socket Line 1089  public class Socket
1089    
1090    /**    /**
1091     * Checks if the socket's input stream is shutdown     * Checks if the socket's input stream is shutdown
1092       *
1093       * @since 1.4
1094     */     */
1095    public boolean isInputShutdown ()    public boolean isInputShutdown ()
1096    {    {
# Line 1064  public class Socket Line 1099  public class Socket
1099    
1100    /**    /**
1101     * Checks if the socket's output stream is shutdown     * Checks if the socket's output stream is shutdown
1102       *
1103       * @since 1.4
1104     */     */
1105    public boolean isOutputShutdown ()    public boolean isOutputShutdown ()
1106    {    {

Legend:
Removed from v.1.22  
changed lines
  Added in v.1.23

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26