public final class SocketMessage
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
class |
SocketMessage.Event |
static interface |
SocketMessage.EventListener |
Constructor and Description |
---|
SocketMessage(int port,
java.lang.String message)
Try to start a listener on the given port.
|
Modifier and Type | Method and Description |
---|---|
void |
addEventListener(SocketMessage.EventListener l)
Add a EventListener
|
boolean |
isAlreadyRunning()
Was the port already in use?
|
static void |
main(java.lang.String[] args) |
void |
removeEventListener(SocketMessage.EventListener l)
Remove an EventListener.
|
public SocketMessage(int port, java.lang.String message)
port
- listen on this server port.message
- send this message if port in usepublic boolean isAlreadyRunning()
public void addEventListener(SocketMessage.EventListener l)
l
- the listenerpublic void removeEventListener(SocketMessage.EventListener l)
l
- the listenerpublic static void main(java.lang.String[] args) throws java.io.IOException
java.io.IOException