Package yapion.serializing.wrapped.net
Class WrappedSocket
- java.lang.Object
-
- yapion.serializing.wrapped.net.WrappedSocket
-
public class WrappedSocket extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description WrappedSocket()WrappedSocket(java.lang.String host, int port)WrappedSocket(java.lang.String host, int port, java.net.InetAddress localAddr, int localPort)WrappedSocket(java.net.InetAddress address, int port)WrappedSocket(java.net.InetAddress address, int port, java.net.InetAddress localAddr, int localPort)WrappedSocket(java.net.Proxy proxy)
-
Method Summary
Modifier and Type Method Description voidbind(java.net.SocketAddress bindpoint)voidclose()voidconnect(java.net.SocketAddress endpoint)voidconnect(java.net.SocketAddress endpoint, int timeout)java.nio.channels.SocketChannelgetChannel()java.net.InetAddressgetInetAddress()java.io.InputStreamgetInputStream()booleangetKeepAlive()java.net.InetAddressgetLocalAddress()intgetLocalPort()java.net.SocketAddressgetLocalSocketAddress()booleangetOOBInline()java.io.OutputStreamgetOutputStream()intgetPort()intgetReceiveBufferSize()java.net.SocketAddressgetRemoteSocketAddress()booleangetReuseAddress()intgetSendBufferSize()java.net.SocketgetSocket()intgetSoLinger()intgetSoTimeout()booleangetTcpNoDelay()intgetTrafficClass()booleanisBound()booleanisClosed()booleanisConnected()booleanisInputShutdown()booleanisOutputShutdown()voidsendUrgentData(int data)voidsetKeepAlive(boolean on)voidsetOOBInline(boolean on)voidsetPerformancePreferences(int connectionTime, int latency, int bandwidth)voidsetReceiveBufferSize(int size)voidsetReuseAddress(boolean on)voidsetSendBufferSize(int size)static voidsetSocketImplFactory(java.net.SocketImplFactory fac)voidsetSoLinger(boolean on, int linger)voidsetSoTimeout(int timeout)voidsetTcpNoDelay(boolean on)voidsetTrafficClass(int tc)voidshutdownInput()voidshutdownOutput()
-
-
-
Constructor Detail
-
WrappedSocket
public WrappedSocket()
-
WrappedSocket
public WrappedSocket(java.net.Proxy proxy)
-
WrappedSocket
public WrappedSocket(java.lang.String host, int port) throws java.io.IOException- Throws:
java.io.IOException
-
WrappedSocket
public WrappedSocket(java.net.InetAddress address, int port) throws java.io.IOException- Throws:
java.io.IOException
-
WrappedSocket
public WrappedSocket(java.lang.String host, int port, java.net.InetAddress localAddr, int localPort) throws java.io.IOException- Throws:
java.io.IOException
-
WrappedSocket
public WrappedSocket(java.net.InetAddress address, int port, java.net.InetAddress localAddr, int localPort) throws java.io.IOException- Throws:
java.io.IOException
-
-
Method Detail
-
getSocket
public java.net.Socket getSocket()
-
connect
public void connect(java.net.SocketAddress endpoint) throws java.io.IOException- Throws:
java.io.IOException
-
connect
public void connect(java.net.SocketAddress endpoint, int timeout) throws java.io.IOException- Throws:
java.io.IOException
-
bind
public void bind(java.net.SocketAddress bindpoint) throws java.io.IOException- Throws:
java.io.IOException
-
getInetAddress
public java.net.InetAddress getInetAddress()
-
getLocalAddress
public java.net.InetAddress getLocalAddress()
-
getPort
public int getPort()
-
getLocalPort
public int getLocalPort()
-
getRemoteSocketAddress
public java.net.SocketAddress getRemoteSocketAddress()
-
getLocalSocketAddress
public java.net.SocketAddress getLocalSocketAddress()
-
getChannel
public java.nio.channels.SocketChannel getChannel()
-
getInputStream
public java.io.InputStream getInputStream() throws java.io.IOException- Throws:
java.io.IOException
-
getOutputStream
public java.io.OutputStream getOutputStream() throws java.io.IOException- Throws:
java.io.IOException
-
setTcpNoDelay
public void setTcpNoDelay(boolean on) throws java.net.SocketException- Throws:
java.net.SocketException
-
getTcpNoDelay
public boolean getTcpNoDelay() throws java.net.SocketException- Throws:
java.net.SocketException
-
setSoLinger
public void setSoLinger(boolean on, int linger) throws java.net.SocketException- Throws:
java.net.SocketException
-
getSoLinger
public int getSoLinger() throws java.net.SocketException- Throws:
java.net.SocketException
-
sendUrgentData
public void sendUrgentData(int data) throws java.io.IOException- Throws:
java.io.IOException
-
setOOBInline
public void setOOBInline(boolean on) throws java.net.SocketException- Throws:
java.net.SocketException
-
getOOBInline
public boolean getOOBInline() throws java.net.SocketException- Throws:
java.net.SocketException
-
setSoTimeout
public void setSoTimeout(int timeout) throws java.net.SocketException- Throws:
java.net.SocketException
-
getSoTimeout
public int getSoTimeout() throws java.net.SocketException- Throws:
java.net.SocketException
-
setSendBufferSize
public void setSendBufferSize(int size) throws java.net.SocketException- Throws:
java.net.SocketException
-
getSendBufferSize
public int getSendBufferSize() throws java.net.SocketException- Throws:
java.net.SocketException
-
setReceiveBufferSize
public void setReceiveBufferSize(int size) throws java.net.SocketException- Throws:
java.net.SocketException
-
getReceiveBufferSize
public int getReceiveBufferSize() throws java.net.SocketException- Throws:
java.net.SocketException
-
setKeepAlive
public void setKeepAlive(boolean on) throws java.net.SocketException- Throws:
java.net.SocketException
-
getKeepAlive
public boolean getKeepAlive() throws java.net.SocketException- Throws:
java.net.SocketException
-
setTrafficClass
public void setTrafficClass(int tc) throws java.net.SocketException- Throws:
java.net.SocketException
-
getTrafficClass
public int getTrafficClass() throws java.net.SocketException- Throws:
java.net.SocketException
-
setReuseAddress
public void setReuseAddress(boolean on) throws java.net.SocketException- Throws:
java.net.SocketException
-
getReuseAddress
public boolean getReuseAddress() throws java.net.SocketException- Throws:
java.net.SocketException
-
close
public void close() throws java.io.IOException- Throws:
java.io.IOException
-
shutdownInput
public void shutdownInput() throws java.io.IOException- Throws:
java.io.IOException
-
shutdownOutput
public void shutdownOutput() throws java.io.IOException- Throws:
java.io.IOException
-
isConnected
public boolean isConnected()
-
isBound
public boolean isBound()
-
isClosed
public boolean isClosed()
-
isInputShutdown
public boolean isInputShutdown()
-
isOutputShutdown
public boolean isOutputShutdown()
-
setSocketImplFactory
public static void setSocketImplFactory(java.net.SocketImplFactory fac) throws java.io.IOException- Throws:
java.io.IOException
-
setPerformancePreferences
public void setPerformancePreferences(int connectionTime, int latency, int bandwidth)
-
-