public static interface TcpConnection.SocketWrapper
Socket or anything that can be made to same abstraction. Custom
implementations of this interface can be returned from a custom TcpConnection.SocketFactory that is
set to TcpConnection.setSocketFactory(SocketFactory) . NOTE! This wrapper interface
contains all methods that the SDK would need to call for a Socket. If new such calls
are needed, then those methods will be added to this interface.void close()
throws IOException
Socket.close().IOExceptionvoid connect(InetSocketAddress addr) throws IOException
Socket.connect(SocketAddress).IOExceptionvoid connect(InetSocketAddress addr, int connectTimeout) throws IOException
Socket.connect(SocketAddress, int).IOExceptionInputStream getInputStream() throws IOException
Socket.getInputStream().IOExceptionSocketAddress getLocalSocketAddress()
Socket.getLocalSocketAddress().OutputStream getOutputStream() throws IOException
Socket.getOutputStream().IOExceptionSocketAddress getRemoteSocketAddress()
Socket.getRemoteSocketAddress().boolean isClosed()
Socket.isClosed().boolean isConnected()
Socket.isConnected().void setKeepAlive(boolean keepAlive)
throws IOException
Socket.setKeepAlive(boolean).IOExceptionvoid setReceiveBufferSize(int receiveBufferSize)
throws IOException
Socket.setReceiveBufferSize(int).IOExceptionvoid setSendBufferSize(int sendBufferSize)
throws IOException
Socket.setSendBufferSize(int).IOExceptionvoid setSoTimeout(int handshakeTimeout)
throws IOException
Socket.setSoTimeout(int).IOExceptionvoid setTcpNoDelay(boolean tcpNoDelay)
throws IOException
Socket.setTcpNoDelay(boolean).IOExceptionCopyright © 2026. All rights reserved.