public class WebsocketServerController
extends java.lang.Object
Constructor and Description |
---|
WebsocketServerController(processing.core.PApplet p,
java.lang.reflect.Method serverEvent)
Initiates the communication management between websocket events and the Processing sketch
|
Modifier and Type | Method and Description |
---|---|
WebsocketServerEvents |
findMemberByName(java.lang.String memberName)
Find specific client connection from a name.
|
void |
join(WebsocketServerEvents socket)
Add new client to the list of all active clients
|
void |
remove(WebsocketServerEvents socket)
Removes client to the list of all active clients
|
void |
sendToOnMessageListener(java.lang.String message)
Sends incoming message directly to the Processing sketch's websocket event function
|
void |
writeAllMembers(java.lang.String message)
Writes a message to all active clients
|
void |
writeSpecificMember(java.lang.String memberName,
java.lang.String message)
This method is not yet fully implemented, and therefore not working!
|
public WebsocketServerController(processing.core.PApplet p, java.lang.reflect.Method serverEvent)
p
- The Processing sketch's PApplet objectserverEvent
- The Processing sketch's websocket event functionpublic void join(WebsocketServerEvents socket)
socket
- The specific connection between client and serverpublic void remove(WebsocketServerEvents socket)
socket
- The specific connection between client and serverpublic void writeAllMembers(java.lang.String message)
message
- Message to send to all clientspublic void writeSpecificMember(java.lang.String memberName, java.lang.String message)
memberName
- Name of the specific clientmessage
- Message to send to clientpublic WebsocketServerEvents findMemberByName(java.lang.String memberName)
memberName
- Name of the client connectionpublic void sendToOnMessageListener(java.lang.String message)
message
- The message that has been received