public class TCPClient extends Object
| Modifier and Type | Field and Description |
|---|---|
boolean |
connected
true, if currently connected, false otherwise
|
String |
IMEI
String holding the phone's IMEI number which is used for authorisation purposes at the application server
|
| Constructor and Description |
|---|
TCPClient() |
| Modifier and Type | Method and Description |
|---|---|
void |
connect(String IPAddress,
String Port)
Connecting to application server with IP:port information
|
void |
disconnect()
Disconnecting from application server
|
com.airs.platform.Method |
read()
Reads Method from TCP connection
|
boolean |
startTCP(AIRS_remote airs,
String IPAddress,
String IPPort)
Starts the TCP client
|
boolean |
write(com.airs.platform.Method method)
Writes a
Method to current TCP connection |
public boolean connected
public String IMEI
public boolean startTCP(AIRS_remote airs, String IPAddress, String IPPort)
airs - Reference to the AIRS_remote service calling this TCP clientIPAddress - String holding the IP address to connect toIPPort - Port of the application server to connect topublic void connect(String IPAddress, String Port)
IPAddress - String of the IP address of the application server to connect toPort - port number of the application serverpublic void disconnect()
public boolean write(com.airs.platform.Method method)
Method to current TCP connectionmethod - Reference to the Method to be writtenpublic com.airs.platform.Method read()
Method that was read