Skip to content

Commit 508f9b9

Browse files
authored
Update README.md
1 parent bf7f8f5 commit 508f9b9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ using WebSocketServer;
1717

1818
public class MyWebSocketServer: WebSocketServer {
1919

20-
public void OnOpen(WebSocketConnection connection) {
20+
override public void OnOpen(WebSocketConnection connection) {
2121
// Here, (string)connection.id gives you a unique ID to identify the client.
2222
Debug.Log(connection.id);
2323
}
2424

25-
public void OnMessage(WebSocketMessage message) {
25+
override public void OnMessage(WebSocketMessage message) {
2626
// (WebSocketConnection)message.connection gives you the connection that send the message.
2727
// (string)message.id gives you a unique ID for the message.
2828
// (string)message.data gives you the message content.
@@ -31,7 +31,7 @@ public class MyWebSocketServer: WebSocketServer {
3131
Debug.Log(message.data);
3232
}
3333

34-
public void OnOpen(WebSocketConnection connection) {
34+
override public void OnClose(WebSocketConnection connection) {
3535
// Here is the same as OnOpen
3636
Debug.Log(connection.id);
3737
}

0 commit comments

Comments
 (0)