public class TCPInputConnection
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.io.InputStream |
is
The input stream.
|
protected java.net.Socket |
sock
The client socket.
|
Constructor and Description |
---|
TCPInputConnection(java.net.Socket sock)
Create a new tcp input connection.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the connection.
|
byte[] |
read()
Receive a message from a socket.
|
protected int |
readByte()
Read a byte from the stream.
|
protected java.net.Socket sock
protected java.io.InputStream is
public TCPInputConnection(java.net.Socket sock) throws java.io.IOException
sock
- The client socket.java.io.IOException
public byte[] read() throws java.io.IOException
accept
- The socket.java.io.IOException
public void close()
protected int readByte() throws java.io.IOException
java.io.IOException