Package com.ngrok.net
Class AbstractSocketImpl
- java.lang.Object
-
- java.net.SocketImpl
-
- com.ngrok.net.AbstractSocketImpl
-
- All Implemented Interfaces:
SocketOptions
- Direct Known Subclasses:
ConnectionSocketImpl
,ListenerSocketImpl
public class AbstractSocketImpl extends SocketImpl
Abstract implementation of theSocketImpl
interface.
-
-
Field Summary
-
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 Constructor Description AbstractSocketImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
accept(SocketImpl s)
protected int
available()
protected void
bind(InetAddress host, int port)
protected void
close()
protected void
connect(String host, int port)
protected void
connect(InetAddress address, int port)
protected void
connect(SocketAddress address, int timeout)
protected void
create(boolean stream)
protected InputStream
getInputStream()
Object
getOption(int optID)
protected OutputStream
getOutputStream()
protected void
listen(int backlog)
protected void
sendUrgentData(int data)
void
setOption(int optID, Object value)
-
Methods inherited from class java.net.SocketImpl
getFileDescriptor, getInetAddress, getLocalPort, getOption, getPort, setOption, setPerformancePreferences, shutdownInput, shutdownOutput, supportedOptions, supportsUrgentData, toString
-
-
-
-
Method Detail
-
create
protected void create(boolean stream) throws IOException
- Specified by:
create
in classSocketImpl
- Throws:
IOException
-
connect
protected void connect(String host, int port) throws IOException
- Specified by:
connect
in classSocketImpl
- Throws:
IOException
-
connect
protected void connect(InetAddress address, int port) throws IOException
- Specified by:
connect
in classSocketImpl
- Throws:
IOException
-
connect
protected void connect(SocketAddress address, int timeout) throws IOException
- Specified by:
connect
in classSocketImpl
- Throws:
IOException
-
bind
protected void bind(InetAddress host, int port) throws IOException
- Specified by:
bind
in classSocketImpl
- Throws:
IOException
-
listen
protected void listen(int backlog) throws IOException
- Specified by:
listen
in classSocketImpl
- Throws:
IOException
-
accept
protected void accept(SocketImpl s) throws IOException
- Specified by:
accept
in classSocketImpl
- Throws:
IOException
-
getInputStream
protected InputStream getInputStream() throws IOException
- Specified by:
getInputStream
in classSocketImpl
- Throws:
IOException
-
getOutputStream
protected OutputStream getOutputStream() throws IOException
- Specified by:
getOutputStream
in classSocketImpl
- Throws:
IOException
-
available
protected int available() throws IOException
- Specified by:
available
in classSocketImpl
- Throws:
IOException
-
close
protected void close() throws IOException
- Specified by:
close
in classSocketImpl
- Throws:
IOException
-
sendUrgentData
protected void sendUrgentData(int data) throws IOException
- Specified by:
sendUrgentData
in classSocketImpl
- Throws:
IOException
-
setOption
public void setOption(int optID, Object value) throws SocketException
- Throws:
SocketException
-
getOption
public Object getOption(int optID) throws SocketException
- Throws:
SocketException
-
-