public class SocketConnection extends java.lang.Object implements IConnection
| Modifier and Type | Method and Description |
|---|---|
void |
close()
closes the connection
|
boolean |
isOpen()
returns whether the connection is open
|
byte[] |
readPacket()
reads the next packet
|
void |
writePacket(byte[] packet)
writes a new packet
|
public boolean isOpen()
isOpen in interface IConnectionpublic void close()
throws java.io.IOException
close in interface IConnectionjava.io.IOExceptionpublic byte[] readPacket()
throws java.io.IOException
readPacket in interface IConnectionClosedConnectionException - - if the connection has been closed.java.io.IOExceptionpublic void writePacket(byte[] packet)
throws java.io.IOException
writePacket in interface IConnectionClosedConnectionException - - if the connection has been closed.java.io.IOException