public class Messenger
extends java.lang.Object
| Constructor and Description |
|---|
Messenger(java.net.Socket clientSide)
The messenger class is used to communicate with
the server in the form of both receiving and
sending Serializable message objects through
the specified socket.
|
| Modifier and Type | Method and Description |
|---|---|
java.io.Serializable |
receive()
Listens for server messages on the socket indefinitely.
|
void |
send(MessageContainer container)
Used for sending a Message object to the server in the
form of the contents of a MessageContainer.
|
public Messenger(java.net.Socket clientSide)
clientSide - The specified socket.public void send(MessageContainer container)
container - The container wit the desired message
contents.public java.io.Serializable receive()
throws java.lang.InterruptedException
java.lang.InterruptedException - In case stream is broken.