Network module for Unity (or c# project with small fix).
Create Network
instance in your script.
Start server on your device or connect to other tcp server.
Because UDP doesn't have 'connection' with others, to communicate with others, you have to start server and call Connect(string, int)
method.
To send your data to another, you have to know witch node is connected. By subscribing node state change with NodeStateHandler
, you can get connected node.
In receving function, there is a method that doesn't need to pass node to receving from node : Receive()
.
I recommand to use this method to receive packet from others and receving method include this must called periodically.
It is recommended to use Unity's Update()
method to call receiving method periodically.
... document being updated