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 theSocketImplinterface.
-
-
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 voidaccept(SocketImpl s)protected intavailable()protected voidbind(InetAddress host, int port)protected voidclose()protected voidconnect(String host, int port)protected voidconnect(InetAddress address, int port)protected voidconnect(SocketAddress address, int timeout)protected voidcreate(boolean stream)protected InputStreamgetInputStream()ObjectgetOption(int optID)protected OutputStreamgetOutputStream()protected voidlisten(int backlog)protected voidsendUrgentData(int data)voidsetOption(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:
createin classSocketImpl- Throws:
IOException
-
connect
protected void connect(String host, int port) throws IOException
- Specified by:
connectin classSocketImpl- Throws:
IOException
-
connect
protected void connect(InetAddress address, int port) throws IOException
- Specified by:
connectin classSocketImpl- Throws:
IOException
-
connect
protected void connect(SocketAddress address, int timeout) throws IOException
- Specified by:
connectin classSocketImpl- Throws:
IOException
-
bind
protected void bind(InetAddress host, int port) throws IOException
- Specified by:
bindin classSocketImpl- Throws:
IOException
-
listen
protected void listen(int backlog) throws IOException- Specified by:
listenin classSocketImpl- Throws:
IOException
-
accept
protected void accept(SocketImpl s) throws IOException
- Specified by:
acceptin classSocketImpl- Throws:
IOException
-
getInputStream
protected InputStream getInputStream() throws IOException
- Specified by:
getInputStreamin classSocketImpl- Throws:
IOException
-
getOutputStream
protected OutputStream getOutputStream() throws IOException
- Specified by:
getOutputStreamin classSocketImpl- Throws:
IOException
-
available
protected int available() throws IOException- Specified by:
availablein classSocketImpl- Throws:
IOException
-
close
protected void close() throws IOException- Specified by:
closein classSocketImpl- Throws:
IOException
-
sendUrgentData
protected void sendUrgentData(int data) throws IOException- Specified by:
sendUrgentDatain 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
-
-