Class ServerNetCommunication
java.lang.Object
ServerNetCommunication
public class ServerNetCommunication
- extends java.lang.Object
Class ServerNetCommunication sends and receives messages to/from the server via the internet
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ServerNetCommunication
public ServerNetCommunication(ShowMessagesAble p_mess,
java.util.ResourceBundle p_i18n)
connect
public int connect(java.lang.String server_name,
int server_port)
- It creates a connection with the server - a socket and two streams
disconnect
public void disconnect()
isConnected
public boolean isConnected()
getError
public int getError()
getErrorMessage
public java.lang.String getErrorMessage()
send
public void send(byte[] buffer,
int delka)
throws ServerNetCommunicationException
- Throws:
ServerNetCommunicationException
receive
public int receive(byte[] buffer,
byte EOM)
throws ServerNetCommunicationException
- Throws:
ServerNetCommunicationException