Network.Attributes Namespace


  Class Description
Public class PacketIgnorePropertyAttribute
If you want to ignore a property in a packet (which shouldn't be serialized) just mark it with this attribute. The serializer is going to skip all the properties which own this property.
Public class PacketRequestAttribute
In order to generate an answer out of a question, the relations between the request and response packets have to be set. E.g NameResponse -> NameRequest.
Public class PacketTypeAttribute
To identify every packet server and client side, a unique identifier is needed. Mark every packet class with this attribute and set a unique id. (UInt16) 2^16 (65536) unique ids are possible. Double usage of one id will lead to an exception. Following ids are already taken by the network lib: - (0) PingRequest - (1) PingResponse - (2) CloseRequest - (3) EstablishUdpRequest - (4) EstablishUdpResponse - (5) EstablishUdpResponseACK - (6) VersionRequest - (7) VersionResponse - (8) AddPacketTypeRequest - (9) AddPacketTypeResponse Knowledge about the ID isn't essential anymore. (Since version