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 ofAbstractSocketImpl
for establishing a socket connection to a remote server.
-
-
Field Summary
Fields Modifier and Type Field Description protected Connection
connection
-
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 protected
ConnectionSocketImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected InputStream
getInputStream()
Creates and returns aConnectionInputStream
for reading data from the connection.protected OutputStream
getOutputStream()
Creates and returns aConnectionOutputStream
for writing data to the connection.protected void
setConnection(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 aConnectionInputStream
for reading data from the connection.- Overrides:
getInputStream
in classAbstractSocketImpl
- Returns:
- an
InputStream
for reading data - Throws:
IOException
- if an I/O error occurs
-
getOutputStream
protected OutputStream getOutputStream() throws IOException
Creates and returns aConnectionOutputStream
for writing data to the connection.- Overrides:
getOutputStream
in classAbstractSocketImpl
- Returns:
- an
OutputStream
for writing data - Throws:
IOException
- if an I/O error occurs
-
-