Last active
August 29, 2015 14:13
-
-
Save BrentFarris/244b70fbcb0938aa16ca to your computer and use it in GitHub Desktop.
Forge Networking Sample: Registering Disconnected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Note: 15937 is the port number of the socket you started the connection on | |
Networking.Sockets[15937].disconnected += MyMethod; | |
void MyMethod() | |
{ | |
Debug.Log("Connection Closed or Lost"); | |
} | |
// Or you can in-line if you wish | |
Networking.Sockets[15937].disconnected += delegate | |
{ | |
Debug.Log("Connection Closed or Lost"); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment