qualisys / qualisys_dotnet_sdk

C# (.NET) implementation of the real-time protocol for Qualisys Track Manager
MIT License
8 stars 5 forks source link

Receive function fixes #23

Closed nilzilch closed 3 years ago

nilzilch commented 3 years ago

Changed RTNetwork.Receive to return a response class instead of an int. The struct contains an enum with: success, timeout, disconnect and error. And also number of received bytes. Previously there was no way of distinguishing between timeout and disconnect. RTNetwork.Receive uses Socket.Receive and Socket.ReceiveFrom, which both returns number of bytes read and 0 if the connection was shut down by the remote host.

Depricated RTProtocol.ReceiveRTPacket and replaced it with RTProtocol.Receive which returns an enum with respone type (success, timeout, error and disconnect).