async/await TCP socket implementation for Unity3d.
- Attatch
UnityTCP.csto arbitary GameObject - Change socket type to
Server - Set port number you want to open
- Set some callback events
OnMessagereturns received string messageOnEstablishedcalled when connection is established and returns connected TcpClientOnDisconnectedcalled when connection is lost and returns disconnected client's Endpoint
- Attatch
UnityTCP.csto arbitary GameObject - Change socket type to
Client - Set host address and port number you want to access
- Set
OnMessagecallback event- this will be called when a server send message to you
Sample scene is included in Assets/UnityTCP/Sample.unity