https://github.com/sacristan/unitysocketio
https://github.com/sacristan/unitysocketio
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/sacristan/unitysocketio
- Owner: Sacristan
- Created: 2016-09-27T12:11:57.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-09-27T12:22:16.000Z (over 8 years ago)
- Last Synced: 2025-02-13T20:53:11.060Z (4 months ago)
- Language: C#
- Size: 160 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Usage:
```cs
IEnumerator Start()
{
Debug.Log("Waiting for connection...");
yield return SocketIOClient.AttemptConnection();
Debug.Log("Connected!");SocketIOClient.On("authorised", OnAuthorised);
SocketIOClient.On("unity_client_connected", OnClientConnected);
SocketIOClient.On("unity_client_disconnected", OnClientDisconnected);
}
private void OnAuthorised(SocketIOEvent obj)
{
Debug.Log("Client authorized: " + obj.data);
}private void OnClientConnected(SocketIOEvent obj)
{
Debug.Log("Client connected: " + obj.data);
}private void OnClientDisconnected(SocketIOEvent obj)
{
Debug.Log("Client disconnected: " + obj.data);
}
```For original author - see readme. I would be glad to fork this repo :)