public abstract class SocketImpl extends Object
Modifier and Type | Field and Description |
---|---|
protected InetAddress |
address
address
|
protected FileDescriptor |
fd
FileDescriptor
|
static int |
IP_MULTICAST_IF |
protected int |
localport
localport
|
protected int |
port
port
|
static int |
SO_BINDADDR |
static int |
SO_LINGER |
static int |
SO_REUSEADDR |
static int |
SO_TIMEOUT |
static int |
TCP_NODELAY |
Constructor and Description |
---|
SocketImpl()
SocketImpl
|
Modifier and Type | Method and Description |
---|---|
protected abstract void |
accept(SocketImpl socketimpl) |
protected abstract int |
available() |
protected abstract void |
bind(InetAddress inetaddress,
int i) |
protected abstract void |
close() |
protected abstract void |
connect(InetAddress inetaddress,
int i) |
protected abstract void |
connect(String s,
int i) |
protected abstract void |
create(boolean stream) |
protected FileDescriptor |
getFileDescriptor() |
protected InetAddress |
getInetAddress() |
protected abstract InputStream |
getInputStream() |
protected int |
getLocalPort() |
abstract Object |
getOption(int i) |
protected abstract OutputStream |
getOutputStream() |
protected int |
getPort() |
protected abstract void |
listen(int i) |
abstract void |
setOption(int i,
Object obj) |
String |
toString()
Returns a string representation of the object.
|
protected InetAddress address
protected int port
protected int localport
protected FileDescriptor fd
public static final int TCP_NODELAY
public static final int SO_BINDADDR
public static final int SO_REUSEADDR
public static final int IP_MULTICAST_IF
public static final int SO_LINGER
public static final int SO_TIMEOUT
protected abstract void accept(SocketImpl socketimpl) throws IOException
socketimpl
- ?IOException
- ?protected abstract int available() throws IOException
IOException
- ?protected abstract void bind(InetAddress inetaddress, int i) throws IOException
inetaddress
- ?i
- ?IOException
- ?protected abstract void close() throws IOException
IOException
- ?protected abstract void connect(String s, int i) throws IOException
s
- ?i
- ?IOException
- ?protected abstract void connect(InetAddress inetaddress, int i) throws IOException
inetaddress
- ?i
- ?IOException
- ?protected abstract void create(boolean stream) throws IOException
stream
- ?IOException
- ?protected FileDescriptor getFileDescriptor()
protected InetAddress getInetAddress()
protected abstract InputStream getInputStream() throws IOException
IOException
- ?protected int getLocalPort()
public abstract Object getOption(int i) throws SocketException
i
- ?SocketException
- ?protected abstract OutputStream getOutputStream() throws IOException
IOException
- ?protected int getPort()
protected abstract void listen(int i) throws IOException
i
- ?IOException
- ?public abstract void setOption(int i, Object obj) throws SocketException
i
- ?obj
- ?SocketException
- ?public String toString()
Object
toString
method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.
The toString
method for class Object
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@
', and
the unsigned hexadecimal representation of the hash code of the
object.