Skip to main content

Socket

Complete API reference for Socket, including constructors, attributes, virtual attributes, and methods.

Package: JAVARuntime

Category: Uncategorized

Component: no


public class Socket extends Socket

Constructors

SignatureDescription
Socket()Creates a new instance of Socket.
Socket(Socket)Executes Socket and returns after the underlying engine call finishes.
Socket(Proxy)Creates a new instance of Socket.
Socket(SocketImpl)Executes Socket and returns after the underlying engine call finishes.
Socket(String, int)Executes Socket and returns after the underlying engine call finishes.
Socket(InetAddress, int)Executes Socket and returns after the underlying engine call finishes.
Socket(String, int, InetAddress, int)Executes Socket and returns after the underlying engine call finishes.
Socket(InetAddress, int, InetAddress, int)Executes Socket and returns after the underlying engine call finishes.
Socket(String, int, boolean)Executes Socket and returns after the underlying engine call finishes.
Socket(InetAddress, int, boolean)Executes Socket and returns after the underlying engine call finishes.

Methods

SignatureReturnsDescription
connect(SocketAddress)voidExecutes connect and returns after the underlying engine call finishes.
connect(SocketAddress, int)voidExecutes connect and returns after the underlying engine call finishes.
bind(SocketAddress)voidExecutes bind and returns after the underlying engine call finishes.
getInetAddress()InetAddressReturns the current inet address.
getLocalAddress()InetAddressReturns the current local address.
getPort()intReturns the current port.
getLocalPort()intReturns the current local port.
getRemoteSocketAddress()SocketAddressReturns the current remote socket address.
getLocalSocketAddress()SocketAddressReturns the current local socket address.
getChannel()SocketChannelReturns the current channel.
getInputStream()InputStreamExecutes getInputStream and returns after the underlying engine call finishes.
getOutputStream()OutputStreamExecutes getOutputStream and returns after the underlying engine call finishes.
setTcpNoDelay(boolean)voidExecutes setTcpNoDelay and returns after the underlying engine call finishes.
getTcpNoDelay()booleanExecutes getTcpNoDelay and returns after the underlying engine call finishes.
setSoLinger(boolean, int)voidExecutes setSoLinger and returns after the underlying engine call finishes.
getSoLinger()intExecutes getSoLinger and returns after the underlying engine call finishes.
sendUrgentData(int)voidExecutes sendUrgentData and returns after the underlying engine call finishes.
setOOBInline(boolean)voidExecutes setOOBInline and returns after the underlying engine call finishes.
getOOBInline()booleanExecutes getOOBInline and returns after the underlying engine call finishes.
setSoTimeout(int)voidExecutes setSoTimeout and returns after the underlying engine call finishes.
getSoTimeout()intExecutes getSoTimeout and returns after the underlying engine call finishes.
setSendBufferSize(int)voidExecutes setSendBufferSize and returns after the underlying engine call finishes.
getSendBufferSize()intExecutes getSendBufferSize and returns after the underlying engine call finishes.
setReceiveBufferSize(int)voidExecutes setReceiveBufferSize and returns after the underlying engine call finishes.
getReceiveBufferSize()intExecutes getReceiveBufferSize and returns after the underlying engine call finishes.
setKeepAlive(boolean)voidExecutes setKeepAlive and returns after the underlying engine call finishes.
getKeepAlive()booleanExecutes getKeepAlive and returns after the underlying engine call finishes.
setTrafficClass(int)voidExecutes setTrafficClass and returns after the underlying engine call finishes.
getTrafficClass()intExecutes getTrafficClass and returns after the underlying engine call finishes.
setReuseAddress(boolean)voidExecutes setReuseAddress and returns after the underlying engine call finishes.
getReuseAddress()booleanExecutes getReuseAddress and returns after the underlying engine call finishes.
close()voidExecutes close and returns after the underlying engine call finishes.
shutdownInput()voidExecutes shutdownInput and returns after the underlying engine call finishes.
shutdownOutput()voidExecutes shutdownOutput and returns after the underlying engine call finishes.
toString()StringReturns the string representation.
isConnected()booleanReturns whether connected is true.
isBound()booleanReturns whether bound is true.
isClosed()booleanReturns whether closed is true.
isInputShutdown()booleanReturns whether input shutdown is true.
isOutputShutdown()booleanReturns whether output shutdown is true.
setPerformancePreferences(int, int, int)voidSets or updates the performance preferences.
hashCode()intReturns whether code is true.
equals(Object)booleanCompares this instance with another for equality/order.