public class WebsocketServer
extends java.lang.Object
Constructor and Description |
---|
WebsocketServer(processing.core.PApplet parent,
int port,
java.lang.String uri)
The websocket server object that is initiated directly in the Processing sketch
|
Modifier and Type | Method and Description |
---|---|
void |
dispose() |
void |
sendMessage(java.lang.String message)
This method is used for sending messages to all connected clients.
|
public WebsocketServer(processing.core.PApplet parent, int port, java.lang.String uri)
parent
- Processings PApplet objectport
- The port number you want the websocket server to initiate its connection onuri
- The uri you want your server to respond to. Ex. /john (if the port is set to ex. 8025, then the full URI would be ws://localhost:8025/john).public void sendMessage(java.lang.String message)
message
- The message you want to send to all clientspublic void dispose()