public interface IServerConnection extends ISubscribe<byte[]>
Modifier and Type | Field and Description |
---|---|
static int |
MONITOR_PORT
the default port of the server for monitor and trainer connections
|
static java.lang.String |
REMOTE_SERVER_IP
Default IP of remote server 141.79.65.126
|
static java.lang.String |
SERVER_IP
the default IP of the RoboCup server
|
static int |
SERVER_PORT
the default port of the server for agent connections
|
Modifier and Type | Method and Description |
---|---|
void |
establishConnection()
Creates a connection to the server and initializes the input and output
stream
|
boolean |
isConnected() |
void |
sendMessage(byte[] msg)
Sends the passed message to the server
|
void |
startReceiveLoop()
Starts the receive loop that only ends once the socket is shutdown
|
void |
stopReceiveLoop()
Stops the loop of receiving messages and notifying observers after
receiving the next message
|
attach
static final java.lang.String SERVER_IP
static final java.lang.String REMOTE_SERVER_IP
static final int SERVER_PORT
static final int MONITOR_PORT
void establishConnection() throws ConnectionException
ConnectionException
void sendMessage(byte[] msg) throws ConnectionException
msg
- the message to sendConnectionException
void startReceiveLoop() throws ConnectionException
ConnectionException
- if any connection problem occuredvoid stopReceiveLoop()
boolean isConnected()