Read a raw packet with basic structure validation.
| C# | Visual Basic | Visual C++ |
Protected Function ReadPacket ( _ <OutAttribute> ByRef id As Integer _ ) As Byte()
protected: array<unsigned char>^ ReadPacket( [OutAttribute] int% id )
- id ( Int32 %)
- The id from the packet if valid, or 0xFF if not.
The data present in the packet, or null if none.
| Exception | Condition |
|---|---|
| TimeoutException |
A TimeoutException is the only expected Exception, since any other packet error
results in a retry and wait until valid packet data is received.
If the return packet is actually corrupted and never arrives, a timeout will occur.
|