Package com.ngrok.net
Class ConnectionSocketImpl
- java.lang.Object
-
- java.net.SocketImpl
-
- com.ngrok.net.AbstractSocketImpl
-
- com.ngrok.net.ConnectionSocketImpl
-
- All Implemented Interfaces:
SocketOptions
public class ConnectionSocketImpl extends AbstractSocketImpl
An implementation ofAbstractSocketImplfor establishing a socket connection to a remote server.
-
-
Field Summary
Fields Modifier and Type Field Description protected Connectionconnection-
Fields inherited from class java.net.SocketImpl
address, fd, localport, port
-
Fields inherited from interface java.net.SocketOptions
IP_MULTICAST_IF, IP_MULTICAST_IF2, IP_MULTICAST_LOOP, IP_TOS, SO_BINDADDR, SO_BROADCAST, SO_KEEPALIVE, SO_LINGER, SO_OOBINLINE, SO_RCVBUF, SO_REUSEADDR, SO_REUSEPORT, SO_SNDBUF, SO_TIMEOUT, TCP_NODELAY
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedConnectionSocketImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected InputStreamgetInputStream()Creates and returns aConnectionInputStreamfor reading data from the connection.protected OutputStreamgetOutputStream()Creates and returns aConnectionOutputStreamfor writing data to the connection.protected voidsetConnection(Connection connection)-
Methods inherited from class com.ngrok.net.AbstractSocketImpl
accept, available, bind, close, connect, connect, connect, create, getOption, listen, sendUrgentData, setOption
-
Methods inherited from class java.net.SocketImpl
getFileDescriptor, getInetAddress, getLocalPort, getOption, getPort, setOption, setPerformancePreferences, shutdownInput, shutdownOutput, supportedOptions, supportsUrgentData, toString
-
-
-
-
Field Detail
-
connection
protected Connection connection
-
-
Method Detail
-
setConnection
protected void setConnection(Connection connection)
-
getInputStream
protected InputStream getInputStream() throws IOException
Creates and returns aConnectionInputStreamfor reading data from the connection.- Overrides:
getInputStreamin classAbstractSocketImpl- Returns:
- an
InputStreamfor reading data - Throws:
IOException- if an I/O error occurs
-
getOutputStream
protected OutputStream getOutputStream() throws IOException
Creates and returns aConnectionOutputStreamfor writing data to the connection.- Overrides:
getOutputStreamin classAbstractSocketImpl- Returns:
- an
OutputStreamfor writing data - Throws:
IOException- if an I/O error occurs
-
-