Forge Developers | Slack Search | Trello Board Changelog
|
Forge Networking Remastered has been released!!! This is now listed in your Profile!
Go Back

Proper Disconnection Of Sockets

When you host a server or connect to a server, this is often done through the Networking.Host or the Networking.Connect static methods. These methods will return a NetWorker object that has a Disconnect method built in, however this is often not the method you want to call.

The disconnect method described above is used to disconnect a socket that you created yourself without the use of Networking.Host or Networking.Connect. So you may be wondering how you can go about disconnecting your NetWorker when you want to without causing any issues. We have created a Networking.Disconnect method to make this easy. Basically all that is needed is for you to call Networking.Disconnect and pass in the port number or the NetWorker reference to disconnect it.

That's it! :D

Title

Body

Title

Body


Input:

Title

Body


Input: