Network
Chicken chicken chicken, chicken chicken chicken chicken chicken chicken, chicken
chicken chicken chicken.
Provides methods for the asynchronous sending and receiving of objects across the network.
A that allows for the instance to wait until the for a sent packet is received.
Sends the given to the network, via the given and waits
asynchronously for the response, returning it.
The type of the to wait for.
The to send to the network.
The that should send the given packet and wait for the response.
A representing the asynchronous operation, that promises a of
the given type upon completion.
Marks a property to be ignored by a . Its value will not be serialised before
being sent, so will be the default for its type upon deserialisation.
Maps a request packet to the response packet that handles it. This attribute should be placed on the response packet
(must inherit from ) and the of the that
it handles should be given.
Constructs and returns a new instance of the class with the given
type as the handled .
The of the that the decorated should handle.
The of the that the handles.
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:
- 00
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
Knowledge about the ID isn't essential anymore (Since version 2.0.0.0). However, the above IDs should NOT be
overwritten, for compatibility purposes.
Constructs and returns a new instance of the class, with the given ID to
be used for the decorated .
The ID to use for the decorated .
The ID to use for the decorated .
Builds upon the class, implementing Bluetooth and allowing for messages to be conveniently
sent without a large serialisation header.
This class is only available for .NET Framework 4.6 and above. This class is not compiled for .NET Standard, as a
key dependency is only available for the .NET Framework (looking at you, InTheHand).
The for reading and writing data.
Initializes a new instance of the class.
The device Bluetooth information.
Initializes a new instance of the class.
The bluetooth client.
Initializes a new instance of the class.
The device info of the connected device.
The bluetooth client that sends and receives data.
The signal strength of the paired device.
Whether Bluetooth is supported by the current device.
Attempts to connect to the remote endpoint asynchronously.
A representing the asynchronous operation, with the promise of a on completion.
Stores information about a Bluetooth device.
This class is only applicable if the build is for the .NET Framework 4.6. It is only compiled if the 'NET46'
preprocessor variable is set.
Constructs and returns a new instance of the , mapping the given
to the .
The whose properties to use for the new
instance.
The name of the Bluetooth device.
Whether the device is already known.
The signal strength of the Bluetooth connection.
The last time that the device was seen via Bluetooth.
The last time that the device was used.
The for the device.
For each of the given s, generates a
and returns the generated array.
An array of s, for each of which to generate the
corresponding .
An array of s, one for each of the givens.
Provides convenient methods to reduce the number of code lines which are needed to manage all the connections.
By default one tcp and one udp connection will be created automatically.
The reconnect timer. Invoked if we lose the connection.
The for this .
The for this .
A handler which will be invoked if this connection is dead.
A handler which will be invoked if a new connection is established.
Initializes a new instance of the class.
The TCP connection to use.
The UDP connection to use.
Initializes a new instance of the class.
The remote ip address.
The remote port.
Whether to automatically attempt to reconnect to the remote endpoint once the connection is lost.
The interval in milliseconds between reconnect attempts.
The current for this instance.
The current for this instance.
Whether the is currently alive.
Whether the is currently alive.
Whether both the and are currently alive.
If the (or any other sending related method) gets called
and the corresponding connection isn't alive, the can't be sent to the endpoint.
Hence, the is undeliverable. In such a chase, this property indicates
whether to throw an .
true throws on a dead connection.
Signifies that a connection has been made on either the or .
Signifies that a connection has been lost on either the or .
Initialises this instance and attempts to connect to the current .
Tries to connect to the given endpoint.
The sender of the event.
Any event arguments.
Tries to connect to the current .
Closes the and with the given ,
optionally calling the event.
The reason for connection closure.
Whether to call the event. True the tries to reconnect to it's endpoint afterwards again; Plus, calles the event. Otherwise False
Opens the new TCP connection and applies any buffered (i.e. already registered) packet handlers.
Opens the new UDP connection and applies any buffered (i.e. already registered) packet handlers.
Sends a ping over the TCP connection.
Sends the given to the network via TCP. The sender will not receive an answer, due to
no sender instance being given.
The packet to send.
Sends the given to the network, via the given .
The packet to send.
The connection type to use.
Thrown when the given value is an invalid cast.
Sends the given over the network via TCP and awaits a on the
given instance.
The packet to send.
The sender instance to receive a response.
Asynchronously sends the given over the network via TCP and awaits a
of the given type.
The type of to await.
The packet to send.
A representing the asynchronous operation, with the promise of the received
on completion.
Sends the given over the network via the given
and awaits a on the given instance.
The packet to send.
The sender instance to receive a response.
The connection type to use.
Thrown when the given value is an invalid cast.
Asynchronously sends the given over the network via the given
and awaits a of the given type.
The type of to await.
The packet to send.
The connection type to use.
A representing the asynchronous operation, with the promise of the received
on completion.
Thrown when the given value is an invalid cast.
Sends the given to the network via TCP. The sender will not receive an answer, due to
no sender instance being given.
The packet to send.
Sends the given over the network via TCP and awaits a on the
given instance.
The packet to send.
The sender instance to receive a response.
Asynchronously sends the given over the network via TCP and awaits a
of the given type.
The type of to await.
The packet to send.
A representing the asynchronous operation, with the promise of the received
on completion.
Sends the given to the network via UDP. The sender will not receive an answer, due to
no sender instance being given.
The packet to send.
Sends the given over the network via UDP and awaits a on the
given instance.
The packet to send.
The sender instance to receive a response.
Asynchronously sends the given over the network via UDP and awaits a
of the given type.
The type of to await.
The packet to send.
A representing the asynchronous operation, with the promise of the received
on completion.
Reconnects both the and .
Whether to ignore the value and forcibly reconnect.
Creates a new .
The created .
Creates a new .
The created .
Provides the basic methods that all inheritors must implement. It ensures connectivity and
keeps tracks of statistics such as latency. Multi-threaded with 3 separate threads per connection. After calling the
method, every queued will be sent before the is fully
closed.
Every instance has 3 threads:
- (1) Read thread -> Reads objects from the network.
- (2) Invoke thread -> Delegates the handling of received packets to the registered .
- (3) Send thread -> Writes queued objects to the network.
Partial class which implements additional features for the class.
The time interval in milliseconds between ping packets.
A fixed hashcode that persists with the instance for its entire lifetime.
A handler which will be invoked if this connection is dead.
A handler which will be invoked if this connection is dead.
A handler which will be invoked if a new connection is established.
A token source to singal all internal threads to terminate.
Whether this instance should send out a keep alive packet at specific intervals, to ensure there is an alive remote connection.
If set to [false] and wont be enabled/refreshed.
Stopwatch to keep track of when to send out a new .
Stopwatch measuring elapsed time since the last was sent to measure the RTT and ping to
the remote .
An event set whenever a packet is received from the network. Used to save CPU time when waiting for a packet to be
received.
An event set whenever a packet is available to be sent to the network. Used to save CPU time when waiting to
send a packet.
Reads packets from the network and places them into the and
queues.
Handles received packets by invoked their respective .
Sends pending packets to the network from the queue.
The packet converter used to serialise and deserialise outgoing and incoming packets.
Holds all the s that are currently pending connection to this .
Holds all received s whose is not known.
Holds all received s with a known that are yet to be
handled.
Holds all received s without a known that are yet to be
handled.
Holds all s that are handled and are now ready and waiting to be sent to the network.
Maps a to a unique ID.
The value from which new IDs for packet s will be calculated dynamically. Starts at 100
as the library already has built-in packets.
Maps a to the of the
that handles it.
Maps s to the that should be used for
that .
Initializes a new instance of the class.
Initialises this instance's addons, setting up all required variables.
Initialises this instance, setting up all required variables.
The timeout value in milliseconds. If the connection does not receive any packet within the specified timeout,
the connection will timeout and shutdown.
The amount of that are pending handling that this will buffer.
If we receive a packet which has no handler, it will be buffered for future handler registrations (via
,
, and
or their overloads). This value indicates the maximum amount of s that will be buffered
before any are dropped.
The packet buffer.
Whether this is alive and able to communicate with the at
the .
The local for this instance.
The remote that this instance communicates with.
Whether this can operate in dual IPv4 / IPv6 mode.
Whether sending a packet flushes underlying .
This value is only used in a instance, which uses a
to send and receive data. A is unaffected by this value.
Whether this is allowed to fragment frames that are too large to send in one go.
The hop limit for packets sent by this . Comparable to IPv4s TTL (Time To Live).
Whether the packet should be sent directly to its destination or allowed to be routed through multiple destinations
first.
Whether the packet should be send with or without any delay. If disabled, no data will be buffered at all and
sent immediately to it's destination. There is no guarantee that the network performance will be increased.
The 'Time To Live' for this .
Whether this should use a loopback address and bypass hardware.
Whether this should send a keep alive packet to the at
specific intervals, to ensure whether there is a remote or not. If set to false
and won't be refreshed automatically.
The Round Trip Time for a packet.
The ping to the .
Gets or sets the performance of this . The higher the sleep intervals (the lower the performance),
the slower this will handle incoming, pending handling, and outgoing s.
The value of , but simply cast to an .
Allows the usage of a custom implementation for serialisation and deserialisation.
However, the internal structure of the packet should stay the same:
Packet Type : 2 bytes (ushort)
Packet Length : 4 bytes (int)
Packet Data : xx bytes (actual serialised packet data)
The default uses reflection (with type property caching) for serialisation
and deserialisation. This allows good performance over the widest range of packets. Should you want to
handle only a specific set of packets, a custom can allow more throughput (no slowdowns
due to relatively slow reflection).
Event signifying that a connection was closed between this instance and another .
This event is only visible for the network library itself. It garantuees, that the lib itself is capable of receiving connection state changes.
Event signifying that a connection was closed between this instance and another .
Event signifying that this instance established a new connection with either a
or instance.
Registers the given for all packets with the
given key.
The key whose should be handled by the given
.
The delegate to be invoked for each received
packet with the given key.
Deregisters the given for all packets with the
given key.
The key whose delegate method to deregister.
Registers all inheritors in the given with this .
Should this method be called manually, it must be called on both the server and client so that all s
in use are known to all parties (avoids incompatible states; exception thrown otherwise).
The to search in for inheritors of .
All packets in the network lib are included by default. A manual call is not essential, even if the used packets
are not included, as the library will attempt to synchronise known s between the server and client
automatically.
Returns the current instance, so that
the types of packets handled can be read.
The current instance used by this
connection.
Invoked whenever the gets refreshed.
Restores the to the given state.
The state to which to restore the internal .
Configures the timer.
Whether the should be enabled on reconfiguring.
Sends a , if a is not currently being awaited.
Sends the given and asynchronously awaits the .
The type to await.
The to send.
A representing the asynchronous operation, with the promise of a of
the given type upon completion.
Serialises the given using the current and queues it to be sent
to the network. No response is possible as a sender instance is not provided. This method is suitable for static
classes and basic packets with no inheritance.
The to be sent across the network.
Serialises the given using the current and queues it to be sent
to the network.
The to be sent across the network.
The instance which sent the packet.
Reads bytes from the network.
The amount of bytes we want to read.
The read s
Writes bytes to the network.
The bytes to write.
Reads objects from the network and queues them in the queue.
Invokes the relevant for each packet in the queue.
Writes all queued objects in the queue to the network.
Writes any packets queued up in the queue to the network.
Handles all default s that are in the library.
The to be handled.
Invoked for any received s that don't have a registered .
The received without a handler.
Handles the unknown packet.
Whenever a is received without a already registered for
it, it is placed in a timeout in the sad, lonely corner that is .
Whenever a is registered via the 'Connection.RegisterXXX' methods, we need to
search for any lonely packets that can now be handled.
Handles a closure, with the given .
The reason for the closing.
Closes the socket and frees all associated resources.
Handles a case where the remote caused a closure for the given .
The reason for the closing.
Closes this , sends a to the remote ,
and writes all remaining queued s to the network (they are received before the
will be handled).
The reason for the closing.
If this instance should call its event.
Unlocks the connection and allows for data to be sent and received.
Gets a free port that is currently not in use and returns it.
The port found.
Creates and returns a new , with the given local endpoint, remote endpoint, and write lock state.
The local that the binds to.
The remote that the talks to.
Whether the has a write lock.
The instantiated .
Returns The unique hashcode of this instance.
A unique hashcode, suitable for use in hashing algorithms and data structures like a hash table.
Gets the representation of this instance.
The representation of this instance.
Backing field for .
Backing field for . Caches the value one for later use.
Since an assembly cannot be transferred across an OS during runtime, this is a variable that can be set
upon instantiation and it is valid for the lifetime of this instance.
Backing field for . Caches the value one for later use.
Since an assembly cannot be transferred across an OS during runtime, this is a variable that can be set
upon instantiation and it is valid for the lifetime of this instance.
Backing field for . Caches the value one for later use.
Since an assembly cannot be transferred across an OS during runtime, this is a variable that can be set
upon instantiation and it is valid for the lifetime of this instance.
Determins whether the running client has windows xp or higher installed.
The instance to which information should be logged.
Whether the executing assembly is running on OSX.
Since an assembly cannot be transferred across an OS during runtime, this is a variable that can be set
upon instantiation and it is valid for the lifetime of this instance.
Whether the executing assembly is running on Linux.
Since an assembly cannot be transferred across an OS during runtime, this is a variable that can be set
upon instantiation and it is valid for the lifetime of this instance.
Whether the executing assembly is running on Windows.
Since an assembly cannot be transferred across an OS during runtime, this is a variable that can be set
upon instantiation and it is valid for the lifetime of this instance.
Whether the executing assembly is running on Windows.
and the operating system is higher or equal to Windows XP.
true if this instance is windows and xp or higher; otherwise, false.
Whether the instance should automatically log information to the s
output s.
Logs events, exceptions and messages into the given stream. To disable logging into a previous provided stream, call
this method again and provide a null reference as stream. Stream hot swapping is supported.
The stream to log into.
Sends the given packet to the network.
The packet to send to the network.
Sends the given raw, serialised primitive to the network.
The key which identifies the raw data to use for the data.
The serialised raw primitive, as a array.
Holds a instance and provides additional functionality. Holds s
and s. Base class for all other connection containers. Provides the basic methods that all
inheritors must implement.
Initializes a new instance of the class.
The remote ip address.
The remote port.
The IP address of the remote that this container is connected to.
The port of the remote that this container is connected to.
The public RSA key for this instance.
The private RSA key for this instance.
The size of the RSA keys for this instance.
The RSA key-pair that is used for encryption and decryption of encrypted messages.
Holds all the s that are known by this .
Adds the given to the list of assemblies whose s to register upon
establishing a connection. This is not essential, but can speed up performance if a lot of s
must be registered on each connection (these are found using reflection). NOTE: To avoid incompatible states between
the server () and client (), this method
must be called on both sides before a connection is established.
The whose s to add.
Removes the given from the list of assemblies whose s to register upon
establishing a connection.NOTE: To avoid incompatible states between the server ()
and client (), this method must be called on both sides before a connection is established.
The whose s to remove.
The possible results of a connection attempt.
A connection was established successfully.
A connection couldn't be established. The IP, port and firewall might have to be checked.
Could not establish a UDP connection as the parent TCP connection is not alive.
Factory for instantiating s, s, and s
as well as s and s (and their secure variants).
Timeout interval in milliseconds.
The GUID of this assembly, needed for bluetooth connections.
Initializes a new instance of the static class. Sets the .
Finds and returns all Bluetooth devices that are within range of the current device, and are discoverable.
All discoverable Bluetooth devices.
Asynchronously finds and returns all Bluetooth devices that are within range of the current device, and are discoverable.
A representing the asynchronous operation, with the promise of a array on completion.
Creates a and connects it.
The device information for the remote Bluetooth device.
A tuple with the and created .
Asynchronously creates a and connects it.
The device information for the remote Bluetooth device.
A representing the asynchronous operation, with the promise of a tuple with the
and created on completion.
Creates a new instance of the with the given client.
The client to create a connection with.
The created .
Creates a and connects it to the given IP address and port.
The IP address to connect to.
The port to connect to.
The connection result.
The created .
Creates a and connects it to the given IP address and port.
The IP address to connect to.
The port to connect to.
The connection result.
The size to use for the RSA keys.
The created .
Creates a and connects it to the given IP address and port.
The IP address to connect to.
The port to connect to.
The public RSA key in xml format. (https://superdry.apphb.com/tools/online-rsa-key-converter)
The private RSA key in xml format. (https://superdry.apphb.com/tools/online-rsa-key-converter)
The connection result.
The size to use for the RSA keys.
The created .
Creates a and connects it to the given IP address and port.
The IP address to connect to.
The port to connect to.
The RSA key-pair to use.
The connection result.
The created .
Asynchronously creates a and connects it to the given IP address and port.
The IP address to connect to.
The port to connect to.
A representing the asynchronous operation with the promise of a tuple holding the created
and on completion.
Asynchronously creates a and connects it to the given IP address and port.
The IP address to connect to.
The port to connect to.
The size of the RSA keys.
A representing the asynchronous operation with the promise of a tuple holding the created
and on completion.
Asynchronously creates a and connects it to the given IP address and port.
The IP address to connect to.
The port to connect to.
The public RSA key in xml format. (https://superdry.apphb.com/tools/online-rsa-key-converter)
The private RSA key in xml format. (https://superdry.apphb.com/tools/online-rsa-key-converter)
The size of the RSA keys.
A representing the asynchronous operation with the promise of a tuple holding the created
and on completion.
Asynchronously creates a and connects it to the given IP address and port.
The IP address to connect to.
The port to connect to.
The RSA key-pair to use.
A representing the asynchronous operation with the promise of a tuple holding the created
and on completion.
Creates a from the given .
The to wrap.
The created .
Thrown if the given s socket is not connected.
Creates a from the given .
The to wrap.
The public RSA key in xml format. (https://superdry.apphb.com/tools/online-rsa-key-converter)
The private RSA key in xml format. (https://superdry.apphb.com/tools/online-rsa-key-converter)
The size of the RSA keys.
The created .
Thrown if the given s socket is not connected.
Creates a from the given .
The to wrap.
The RSA key-pair to use.
The created .
Thrown if the given s socket is not connected.
Creates a with the given parent .
The via which to connect the .
The connection result.
The created .
Creates a with the given parent .
The via which to connect the .
The connection result.
The size of the RSA keys.
The created .
Creates a with the given parent .
The via which to connect the .
The public RSA key in xml format. (https://superdry.apphb.com/tools/online-rsa-key-converter)
The private RSA key in xml format. (https://superdry.apphb.com/tools/online-rsa-key-converter)
The connection result.
The size of the RSA keys.
The created .
Creates a with the given parent .
The via which to connect the .
The RSA key-pair to use.
The connection result.
The created .
Asynchronously creates a with the given parent .
The via which to connect the .
A representing the asynchronous operation with the promise of a tuple holding the created
and on completion.
The given isn't connected.
Asynchronously creates a with the given parent .
The via which to connect the .
The size of the RSA keys.
A representing the asynchronous operation with the promise of a tuple holding the created
and on completion.
The given isn't connected.
Asynchronously creates a with the given parent .
The via which to connect the .
The public RSA key in xml format. (https://superdry.apphb.com/tools/online-rsa-key-converter)
The private RSA key in xml format. (https://superdry.apphb.com/tools/online-rsa-key-converter)
The size of the RSA keys.
A representing the asynchronous operation with the promise of a tuple holding the created
and on completion.
The given isn't connected.
Asynchronously creates a with the given parent .
The via which to connect the .
The RSA key-pair to use.
A representing the asynchronous operation with the promise of a tuple holding the created
and on completion.
The given isn't connected.
Creates a and connects it to the given IP address and port.
The IP address to connect to.
The port to connect to.
The created .
Creates a and connects it to the given IP address and port.
The IP address to connect to.
The port to connect to.
The size of the RSA keys.
The created .
Creates a and connects it to the given IP address and port.
The IP address to connect to.
The port to connect to.
The public RSA key in xml format. (https://superdry.apphb.com/tools/online-rsa-key-converter)
The private RSA key in xml format. (https://superdry.apphb.com/tools/online-rsa-key-converter)
The size of the RSA keys.
The created .
Creates a and connects it to the given IP address and port.
The IP address to connect to.
The port to connect to.
The RSA key-pair to use.
The created .
Creates a with the given and .
The to use.
The to use.
The created .
Thrown if the given is not connected.
Creates a with the given and .
The to use.
The to use.
The size of the RSA keys.
The created .
Thrown if the given is not connected.
Creates a with the given and .
The to use.
The to use.
The public RSA key in xml format. (https://superdry.apphb.com/tools/online-rsa-key-converter)
The private RSA key in xml format. (https://superdry.apphb.com/tools/online-rsa-key-converter)
The size of the RSA keys.
The created .
Thrown if the given is not connected.
Creates a with the given and .
The to use.
The to use.
The RSA key-pair to use.
The created .
Thrown if the given is not connected.
Creates a listening on the given port.
The port to listen on.
Whether to start the server after instantiation.
The created .
Creates a listening on the given port.
The port to listen on.
The size of the RSA keys.
Whether to start the server after instantiation.
The created .
Creates a listening on the given port.
The port to listen on.
The public RSA key in xml format. (https://superdry.apphb.com/tools/online-rsa-key-converter)
The private RSA key in xml format. (https://superdry.apphb.com/tools/online-rsa-key-converter)
The size of the RSA keys.
Whether to start the server after instantiation.
The created .
Creates a listening on the given port.
The port to listen on.
The RSA key-pair to use.
Whether to start the server after instantiation.
The created .
Creates a with the given IP address, listening on the given port.
The IP address to run at.
The port to listen on.
Whether to start the server after instantiation.
The created .
Creates a with the given IP address, listening on the given port.
The IP address to run at.
The port to listen on.
The size of the RSA keys.
Whether to start the server after instantiation.
The created .
Creates a with the given IP address, listening on the given port.
The IP address to run at.
The port to listen on.
The public RSA key in xml format. (https://superdry.apphb.com/tools/online-rsa-key-converter)
The private RSA key in xml format. (https://superdry.apphb.com/tools/online-rsa-key-converter)
The size of the RSA keys.
Whether to start the server after instantiation.
The created .
Creates a with the given IP address, listening on the given port.
The IP address to run at.
The port to listen on.
The RSA key-pair to use.
Whether to start the server after instantiation.
The created .
Describes the methods that a packet converter must implement in order to be able to serialise and deserialise
packets to and from a binary form.
Serialises the given object to a array.
The object to serialise into a array.
A array that holds the serialised packet.
Serialises the given object to a array.
The of packet to serialise.
The object to serialise into a array.
A array that holds the serialised packet.
Deserialises the given array into a of the given .
The of to deserialise the array to.
The array holding the serialised .
The deserialised object of the given type.
Deserialises the given array into a of the given .
The of to deserialise the array to.
The array holding the serialised .
The deserialised object of the given type.
Enumerates the possible states of a network object before and after deserialisation.
The network object is null, so there is nothing to read from the network stream.
Identical to .
The network object is not null, so there is something to read from the network stream.
Identical to .
Implements , and provides methods to serialise and deserialise a
object to and from its binary form.
Caches packet s and their relevant s, to avoid slow and unnecessary reflection.
An object to synchronise multi-threaded access to the .
Returns an array of the s that need to be serialised on the given .
If the given has already been cached, it will use the cached array,
to save CPU time.
The whose serialisable properties to get.
An array of all s that should be serialised on the given
Serialises all the properties on the given that need to be serialised to the given
s underlying .
The whose properties to serialise using the given .
The to whose underlying to serialise the properties of
the given .
This method can only serialise properties that lack the custom .
Serialises the given to the given s underlying .
The whose value to serialise.
The to serialise to the given s underlying .
The to whose underlying to serialise the given .
Serialises the given to the given s underlying .
Uses to serialise each of the s
elements to the stream.
The to serialise to the given s underlying .
The holding the .
The to whose underlying to serialise the given .
Thrown if the held in the given is null, or if the s
elements do not have a type.
Serialises the given to the given s underlying .
Uses to serialise each of the s
elements to the stream.
The to serialise to the given s underlying .
The holding the .
The to whose underlying to serialise the given .
Thrown if the held in the given is null, or if the s
elements do not have a type.
Deserialises all the properties on the given that can be deserialised from the given
s underlying .
The whose properties to deserialise using the given .
The from whose underlying to deserialise the properties
of the given .
The given with all deserialisable properties set.
This method can only deserialise properties that lack the custom .
Any other properties will be left at their default values.
Deserialises the given from the given s underlying
.
The whose value to deserialise.
The to deserialise from the given s underlying
.
The from whose underlying to deserialise the given
.
The deserialised from the . This can be null if the
is .
Deserialises the given from the given s underlying
. Uses to serialise
each of the s elements to the stream.
The to deserialise from the given s underlying .
The holding the .
The from whose underlying to deserialise the given
.
Thrown if the s elements do not have a type.
Deserialises the given from the given s underlying
. Uses to serialise
each of the s elements to the stream.
The to deserialise from the given s underlying
.
The holding the .
The from whose underlying to deserialise the given
.
Thrown if the held in the is null, or if the s
elements do not have a type.
Reads a primitive type from the given s underlying
and returns it.
The of the primitive to read from the given s underlying .
The from whose underlying to read the primitive.
The primitive that was read from the given s underlying .
Thrown whenever a is passed to this method that is not a primitive.
Provides helper methods for serialising and deserialising packets to and from their binary form.
The of the custom property that will cause a property to be ignored during serialisation.
See for more information regarding its usage.
Checks whether the given is a primitive type, that is if it lives in the 'System' namespace.
The to test.
Whether the given is a primitive.
If the given is null, then the method will return false.
Checks whether the underlying of the given property is a primitive type. See
for more information regarding its usage.
The to test.
Whether the given s underlying is primitive.
If the given properties underlying element is null, then the method will return false.
Gets all the s of the given that should be serialised (lack the
attribute) and returns them as an array.
The whose s to read.
An array of all the s on the given object.
Gets all the s of the given that should be serialised and
returns them as an array. See for more information.
The whose s to read.
An array of all the s on the given object.
Instantiates and returns a default of the given .
The to instantiate.
The default instance of the given .
Instantiates and returns a default of the given .
The to instantiate.
The default instance of the given .
Instantiates and returns a default of the given generic type.
The generic type of the object to instantiate.
The default instance of the given generic type.
Instantiates and returns a default of the given generic type.
The generic type of packet to instantiate.
The default instance of the given generic type.
Converts raw primitive type values into a packet that can be sent across the network, and vice versa.
Returns a holding the given value.
The key to use for the packet.
The primitive value to send.
A packet holding the given primitive, with the given key.
Returns a holding the given value.
The key to use for the packet.
The primitive value to send.
A packet holding the given primitive, with the given key.
Returns a holding the given value.
The key to use for the packet.
The primitive value to send.
A packet holding the given primitive, with the given key.
Returns a holding the given value.
The key to use for the packet.
The primitive value to send.
A packet holding the given primitive, with the given key.
Returns a holding the given value.
The key to use for the packet.
The primitive value to send.
A packet holding the given primitive, with the given key.
Returns a holding the given value.
The key to use for the packet.
The primitive value to send.
A packet holding the given primitive, with the given key.
Returns a holding the given value.
The key to use for the packet.
The primitive value to send.
A packet holding the given primitive, with the given key.
Returns a holding the given value.
The key to use for the packet.
The primitive value to send.
A packet holding the given primitive, with the given key.
Returns a holding the given value.
The key to use for the packet.
The primitive value to send.
A packet holding the given primitive, with the given key.
Returns a holding the given value, using the encoding.
The key to use for the packet.
The primitive value to send.
A packet holding the given primitive, with the given key.
Returns a holding the given value, using the (little endian) encoding.
The key to use for the packet.
The primitive value to send.
A packet holding the given primitive, with the given key.
Returns a holding the given value, using the encoding. Identical to
method.
The key to use for the packet.
The primitive value to send.
A packet holding the given primitive, with the given key.
Returns a holding the given value, using the encoding.
The key to use for the packet.
The primitive value to send.
A packet holding the given primitive, with the given key.
Returns a holding the given value, using the encoding.
The key to use for the packet.
The primitive value to send.
A packet holding the given primitive, with the given key.
Returns a holding the given value, using the encoding.
The key to use for the packet.
The primitive value to send.
A packet holding the given primitive, with the given key.
Returns a holding the given value, using the encoding.
The key to use for the packet.
The primitive value to send.
A packet holding the given primitive, with the given key.
Returns a holding the given value.
The key to use for the packet.
The primitive value to send.
A packet holding the given primitive, with the given key.
Returns a holding the given value.
The key to use for the packet.
The primitive value to send.
A packet holding the given primitive, with the given key.
Returns a holding the given value.
The key to use for the packet.
The primitive value to send.
A packet holding the given primitive, with the given key.
Converts the given value into bytes and returns them.
The value to convert into bytes.
The byte array of the serialised value.
Converts the array into a and returns it.
The packet whose data to deserialise.
The deserialised value.
Converts the array into a and returns it.
The packet whose data to deserialise.
The deserialised value.
Converts the array into a and returns it.
The packet whose data to deserialise.
The deserialised value.
Converts the array into a and returns it.
The packet whose data to deserialise.
The deserialised value.
Converts the array into a and returns it.
The packet whose data to deserialise.
The deserialised value.
Converts the array into a and returns it.
The packet whose data to deserialise.
The deserialised value.
Converts the array into a and returns it.
The packet whose data to deserialise.
The deserialised value.
Converts the array into a and returns it.
The packet whose data to deserialise.
The deserialised value.
Converts the array into a and returns it.
The packet whose data to deserialise.
The deserialised value.
Converts the array into a using the encoding, and returns it.
The packet whose data to deserialise.
The deserialised value.
Converts the array into a using the (little endian) encoding, and returns it.
The packet whose data to deserialise.
The deserialised value.
Converts the array into a using the (little endian) encoding, and
returns it. Identical to the
method.
The packet whose data to deserialise.
The deserialised value.
Converts the array into a using the encoding, and returns it.
The packet whose data to deserialise.
The deserialised value.
Converts the array into a using the encoding, and returns it.
The packet whose data to deserialise.
The deserialised value.
Converts the array into a using the encoding, and returns it.
The packet whose data to deserialise.
The deserialised value.
Converts the array into a using the encoding, and returns it.
The packet whose data to deserialise.
The deserialised value.
Converts the array into a and returns it.
The packet whose data to deserialise.
The deserialised value.
Converts the array into a and returns it.
The packet whose data to deserialise.
The deserialised value.
Converts the array into a and returns it.
The packet whose data to deserialise.
The deserialised value.
Enumerates the possible reasons for a closing.
An unknown exception occurred in the network library.
The server closed the connection.
The client closed the connection.
The endpoint sent an unknown packet which cant be processed.
Connection timeout reached.
The endpoints version is different.
UDP connection requested in an improper situation.
The client requested too many UDP connections.
An exception in the writePacketThread occured.
Indicates, that the endpoint couldn't be reached and is offline.
An exception in the readPacketThread occured.
An exception in the invokePacketThread occured.
Indicates, that an exception has been thrown in the packet-handling subscriber.
The assembly for the incoming packet is not available. Make sure that every project is including that assembly.
Enumerates the possible types of .
The should use TCP to communicate across the network.
The should use UDP to communicate across the network.
The should use Bluetooth to communicate across the network.
Enumerates the possible severity levels for a log message.
This log message contains information. Low severity.
This log message contains a warning. Medium severity.
This log message contains an error. High severity.
This log message contains an exception. Extreme severity.
Enumerates the possible states that a could be in after transmission.
The packet was successfully transmitted and received.
The packet was not received within the specified timeout. The could be dead.
The is not alive, so no asynchronous transmission is possible.
Enumerates the possible values for sleep intervals. Fastest Performance >> Slowest Performance : SoftRealtime >> EnergySaving
Sleep intervals of more than 500ms.
Identical to .
Sleep intervals of more than 100ms.
Sleep interval of more than 25ms.
Sleep interval of more than 10ms.
Sleep interval of more than 5ms. This is the default value, recommended for usage.
Sleep interval of more than 1ms.
Identical to .
Indicates that a isn't alive.
Implements the
Initializes a new instance of the class.
The connection.
The message.
The exception.
The affected
The connection.
Provides additional functionality to the class.
See https://stackoverflow.com/a/48861922/2934290 for the original question and the relevant code.
Removes the given item from the .
The type for the elements held in the .
The instance that the extension method should affect.
The item to remove from the bag.
Provides additional functionality to the class.
A private thread-safe counter for generating unique hash codes.
Increments are guaranteed to be atomic on all 32-bit and higher systems, as any single-cpu-instruction
operation on a variable is by definition atomic. Since an is 32 bits long, it can be loaded
with 1 instruction into a register on a 32-bit or higher system. Likewise, addition is also atomic. This
guarantees atomic behaviour for increments on an .
Generates a new unique hash code for the via a thread-safe increment operation.
The instance this extension method affects.
A new, unique hash code.
This method is thread safe, see for more info.
Provides additional functionality to the interface.
Adds each item in the into a and return the new .
The type of the elements in the .
The instance that the extension method affects.
The instance with the elements of the .
Provides additional functionality to the class.
The methods in this class function as shortcuts to calling the relevant method.
Provides additional functionality to the class, that is unavailable under
Linux by default.
Reads in and imports from the given XML string.
The this extension method affects.
The XML string from which to load the parameters.
Thrown if the generated from the given xml is null.
Decodes a base-64 encoded string into a byte array and returns it.
The base-64 encoded string.
The byte array that the base-64 encoded text represents.
Provides additional functionality to the struct.
Extracts the private key from the given and returns it as an XML string.
The instance that the extension method affects.
The XML with the private key.
Extracts the public key from the given and returns it as an XML string.
The instance that the extension method affects.
The XML with the public key.
Provides additional functionality to the class.
Returns a that represents asynchronously waiting for the instance
to be set. There is no timeout for the wait operation.
The instance this extension method affects.
The representing the asynchronous operation.
Returns a that represents asynchronously waiting for the
instance to be set. Cancels the if the given timeout is exceeded.
The instance this extension method affects.
The to wait for the operation to complete before it is cancelled.
The representing the asynchronous operation.
Represents a method that handles receiving a of the given type on the given .
The type of that the delegate should handle.
The received object.
The that received the packet.
Describes the methods a class must implement to handle s.
Registers the given for all s of the given type.
The type of the delegate should handle.
The delegate to be invoked for each received packet of the given type.
Registers the given on the given for all
s of the given type.
The type of the delegate should handle.
The delegate to be invoked for each received packet of the given type.
The that should receive the s.
Deregisters all s for the given type.
The type of for which all currently registered s
should be deregistered.
Deregisters all s for the given type that are
currently registered on the given .
The type of for which all currently registered s
should be deregistered.
The on which all currently registered s of the
given type should be deregistered.
Describes the properties and methods that a class must implement to be capable of RSA encryption.
Stores a RSA private and public key pair.
Describes the properties and methods that a class must implement to be able to communicate via secure, RSA encrypted messages.
Provides RSA encryption services, to encrypt serialised s.
Provides RSA decryption services, to decrypt serialised s.
Encrypts the given byte array using the and returns the encrypted version.
The original, plaintext byte array.
The encrypted byte array.
Decrypts the given byte array using the and returns the plaintext version.
The encrypted byte array.
The original, plaintext byte array.
Enumerates the directions that a can be traveling on the network.
The packet is incoming from the network; it is being received by the monitored .
The packet is outgoing to the network; it is being transmitted by the monitored .
Logs network traffic, events and connection states into a given , be it a
or the 'Output' window of Visual Studio.
The that the instance will monitor for network traffic, etc.
Constructs and returns a new instance of the class, that monitors the given
.
The that the should monitor for traffic, events and states.
Whether logging is enabled.
The current timestamp, in the format 'hh:mm:ss:fff'.
The that writes all logged to the current output .
WRites the given message to the current , and to the 'Output' window.
The message that should be logged.
Logs the given message and , with the given
to all output s.
The message to log to the output s.
The to log to the output s.
The of the log message.
If if set to false or the is null,
then no message is logged.
Logs the given with the given to the output
s.
The to log to the output s.
The of the log message.
Logs the given message with the given to the output
s.
The message to log to the output s.
The of the log message.
Sets the output () to the given .
The to log messages into.
Logs an incoming packet to the output s.
The serialised incoming packet.
The incoming object.
Logs an outgoing packet to the output s.
The serialised outgoing packet.
The outgoing object.
Logs the given packet to the output s, along with its direction.
The serialised packet.
The object.
The direction that the packet is traveling across the network.
Builds a with the given parameters and returns it.
The serialised packet.
The object.
The direction that the packet is traveling across the network.
The built .
Builds and returns the header for each log message.
The to log.
The for the log message.
The formatted log message header .
Builds and returns a message containing an .
The to format as a .
The formatted as a message.
Instructs the paired to add all the s in the given .
Initializes a new instance of the class.
Name of the assembly to add.
The name of the that should be added.
Response packet for the packet.
Initializes a new instance of the class.
All registered packet IDs for the currently registered s.
The .
List of all the local IDs that have been registered.
Closes the paired .
Initializes a new instance of the class.
The reason for which the receiving should close.
The reason that the paired should close.
Establishes a UDP connection with the paired .
Initializes a new instance of the class.
The port to use for UDP communication.
The port that the UDP connection should use.
Response packet for the packet.
Initializes a new instance of the class.
The port to use for UDP communication.
The handled .
The port the UDP connection should use.
Acknowledgement packet for the packet.
Represents a packet that can be sent across a network. By default, all properties of the packet will be serialised
(this can be customised using the ). Allowed property types are listed
here: http://www.indie-dev.at/?page_id=461. NOTE: Inheriting classes should ALWAYS include the default parameter-less
constructor. See 'remarks' for more information.
The default, parameter-less constructor is required to allow for dynamic instantiation of an empty packet during
deserialisation, whose properties will be read from a , deserialised and set accordingly.
See for more on the serialisation and deserialisation process.
The ID of the packet. DO NOT CHANGE! This is essential to the packet recognition and handling process.
The transmission state of the packet.
The size in bytes of the serialised packet.
How long it took to receive the packet, in milliseconds.
This feature is not currently implemented.
This method is called immediately before serialisation and sending. Use this to convert any properties to
serialisable forms.
This method is called immediately after deserialisation and before the packet is handled by the relevant
.
Use this to convert any properties to their final forms.
Used to perform ping checks between s.
Response packet for the packet.
Sends a raw, primitive value across a network.
Initializes a new instance of the class.
The key that packet handlers are registered with.
The serialised primitive value.
The key both connections are able to register packet handlers to.
The serialised primitive value.
Represents a request packet.
Represents a response to a .
For the packet to be handled correctly, the handled must be given in the constructor.
Initializes a new instance of the class.
The that is being handled.
Requests a RSA public key from the paired .
Initializes a new instance of the class.
The public key to share.
The size of the public key.
Use OAE Padding.
The public RSA key for encryption, decryption and signing.
The size of the RSA key.
Gets or sets a value indicating whether the use OAE Padding.
true if [use oae padding]; otherwise, false.
Response packet for a .
Initializes a new instance of the class.
The public key to share.
The size of the public key.
The handled .
The public RSA key for encryption, decryption and signing.
The size of the RSA key.
A ping testing packet that functions over UDP.
Response to a packet.
Initializes a new instance of the class.
The handled .
Provides RSA encryption and decryption facilities to a ,
allowing encrypted communication.
Holds the RSA key-pair for the remote .
The RSA encryption provider for encrypting and decrypting packets.
Whether RSA encryption is currently active on this connection.
Initializes a new instance of the class.
The base for sending and receiving data.
The local RSA key-pair for this .
The underlying object that allows communication across the network.
Allows the usage of a custom implementation for serialisation and deserialisation.
However, the internal structure of the packet should stay the same:
Packet Type : 2 bytes (ushort)
Packet Length : 4 bytes (int)
Packet Data : xx bytes (actual serialised packet data)
The default uses reflection (with type property caching) for serialisation
and deserialisation. This allows good performance over the widest range of packets. Should you want to
handle only a specific set of packets, a custom can allow more throughput (no slowdowns
due to relatively slow reflection).
The local RSA key-pair for encryption, decryption, and signing.
The remote RSA key-pair.
The to use for encryption.
The to use for decryption.
Gets whether OAE Padding is active. OAE Padding is only active,
if both communication partners do support OAE Padding.
true if OAE Padding is enabled; otherwise, false.
Whether the RSA functionality is active. RSA functionality requires an additional initialization process, thus
won't be available immediately after the connection has been established. It will never revert to false
once set to true.
Serialises the given , and encrypts the resulting
bytes using the private RSA key and the .
The object to serialise.
The RSA encrypted bytes that represent the given packet.
Serialises the given , and encrypts the resulting
bytes using the private RSA key and the .
The type of the packet to serialise.
The object to serialise.
The RSA encrypted bytes that represent the given packet.
Deserialises the given encrypted bytes into a
of the given type.
The type of packet to deserialise the bytes to.
The RSA encrypted bytes to deserialise.
The deserialised object.
Deserialises the given encrypted bytes into a
of the given type.
The type of packet to deserialise the bytes to.
The RSA encrypted bytes to deserialise.
The deserialised object.
Initialises the fully, and enables RSA functionality once it returns.
Decrypts the given bytes with the .
The encrypted bytes to decrypt.
The decrypted, plaintext bytes.
Encrypts the given bytes with the .
The plaintext bytes to encrypt.
The encrypted bytes.
Provides helper methods for the generation of RSA key-pairs.
Generates and returns a new .
The RSA key size to use.
The unique .
Stores an RSA public/private key-pair.
The max packet size to encrypt.
The max packet size to decrypt.
Replacement value to be used if the private key is unknown, i.e. when receiving an from
a remote .
Initializes a new instance of the class.
Generate a with .
The public key (https://superdry.apphb.com/tools/online-rsa-key-converter).
The private key (https://superdry.apphb.com/tools/online-rsa-key-converter).
The size of the key.
Initializes a new instance of the class. Used for internal purposes. The communication
partner only sends us his public key to encrypt.
The public key.
The size of the key.
Use OAE Padding.
Initializes a new instance of the class. Used for internal purposes. The communication
partner only sends us his public key to encrypt.
The public key (https://superdry.apphb.com/tools/online-rsa-key-converter).
The private key (https://superdry.apphb.com/tools/online-rsa-key-converter).
The size of the key.
Use OAE Padding.
The size of the RSA keys.
The public RSA key.
The private RSA key.
Gets a value indicating whether OAE Padding is enabled.
true if [enable oae padding]; otherwise, false.
Gets the max size of an decrypted packet.
The size of the decryption byte.
Gets the max size of an encrypted packet.
The size of the encryption byte.
Whether the current has a valid public key.
Whether the current has a valid private key.
A secure , implementing RSA encryption.
Initializes a new instance of the class.
The remote ip address.
The remote port.
The local RSA key-pair.
Initializes a new instance of the class.
The TCP connection to use.
The UDP connection to use.
The local RSA key-pair.
Creates and returns a new .
The created .
Creates and returns a new , with the current as the parent.
The created .
A secure , implementing RSA encryption.
Initializes a new instance of the class.
The local ip address.
The local port.
The local RSA key-pair.
Whether to automatically starts to listen to tcp/udp/bluetooth clients.
Initializes a new instance of the class.
The local port.
The local RSA key-pair.
Whether to automatically starts to listen to tcp/udp/bluetooth clients.
Creates and returns a from the given .
The to use for sending and receiving data.
The created .
A secure , implementing RSA encryption.
Initializes a new instance of the class.
The local RSA key-pair.
The to use for sending and receiving data.
The public RSA key.
The private RSA key.
The size of the RSA keys.
The RSA key-pair used for encryption.
Allows the usage of a custom implementation for serialisation and deserialisation.
However, the internal structure of the packet should stay the same:
Packet Type : 2 bytes (ushort)
Packet Length : 4 bytes (int)
Packet Data : xx bytes (actual serialised packet data)
The default uses reflection (with type property caching) for serialisation
and deserialisation. This allows good performance over the widest range of packets. Should you want to
handle only a specific set of packets, a custom can allow more throughput (no slowdowns
due to relatively slow reflection).
A to send and receive objects that supports RSA encryption.
Creates a that implements RSA encryption.
The local end point.
The remote end point.
Whether the has a write lock.
The created .
A secure , implementing RSA encryption.
Initializes a new instance of the class.
The to use for sending and receiving data.
The remote end point to connect to.
The local RSA key-pair.
Whether the connection has a write lock.
The public RSA key.
The private RSA key.
The size of the RSA keys.
The RSA key-pair used for encryption.
Allows the usage of a custom implementation for serialisation and deserialisation.
However, the internal structure of the packet should stay the same:
Packet Type : 2 bytes (ushort)
Packet Length : 4 bytes (int)
Packet Data : xx bytes (actual serialised packet data)
The default uses reflection (with type property caching) for serialisation
and deserialisation. This allows good performance over the widest range of packets. Should you want to
handle only a specific set of packets, a custom can allow more throughput (no slowdowns
due to relatively slow reflection).
A to send and receive objects that supports RSA encryption.
Provides convenient methods to reduce the number of code lines which are needed to manage all connected clients.
Listens for TCP clients.
UDP clients are accepted via TCP, as they require an existing TCP connection before they are accepted.
A handler which will be invoked if this connection is dead.
A handler which will be invoked if a new connection is established.
Maps all s currently connected to the server to any s
they may own.
Listens for Bluetooth clients.
List of all s currently connected to the server.
Initializes a new instance of the class.
The local ip address.
The local port.
Whether to automatically start listening for clients after instantiation.
Initializes a new instance of the class.
The local port.
Whether to automatically start listening for clients after instantiation.
Whether the TCP server is currently online.
Whether s are allowed to connect.
If False the client's can't use the ,
since the automatically tries to establish a .
When a client requests a while is set to false,
the client's will be killed automatically, due to an inappropriate request.
The maximum amount of s that a single can own.
When a requests a once they have already
reached this limit, all existing connections (both s and s)
will be closed.
Whether the Bluetooth server is currently online.
Whether the server will listen for Bluetooth clients. NOTE: Existing connections are unaffected by this value.
The maximum amount of pending bluetooth connections.
Lists all currently connected s.
Lists all currently connected s.
Lists all currently connected s.
The amount of currently connected clients. Includes Bluetooth, TCP, and UDP clients.
Starts both a Bluetooth and TCP server, and listens for incoming connections.
Starts a TCP server and listens for incoming s.
Starts a Bluetooth server and listens for incoming s.
Handles when a successfully connects to the server.
The parent .
The connected .
Handles a connection closure.
The reason for the being closed.
The that closed.
Stops the Bluetooth listener, so that no new s can connect.
Stops the TCP listener, so that no new s can connect.
Stops both the Bluetooth and TCP listeners, so that no new connections can connect.
Closes all currently connected s (be it Bluetooth, TCP, or UDP).
The reason for the connection closure.
Closes all currently connected s.
The reason for the connection closure.
Closes all currently connected s.
The reason for the connection closure.
Closes all currently connected s.
The reason for the connection closure.
Sends the given to all currently connected s.
The packet to send via broadcast.
Sends the given to all currently connected s.
The packet to send via broadcast.
Sends the given to all currently connected s.
The packet to send via broadcast.
Creates a new instance from the given .
The to use for the .
A that uses the given to send data to and from the client.
Returns all s that exist for the given .
The whose child s to return.
A holding all child UDP connections of the given .
Returns the parent of the given .
The whose parent to return.
The which owns the given .
Occurs when [connection closed]. This action will be called if a TCP or an UDP has been closed.
If a TCP connection has been closed, all its attached UDP connections are lost as well.
If a UDP connection has been closed, the attached TCP connection may still be alive.
Signifies that a new (i.e. , ,
or ) has connected successfully to the server.
Builds upon the class, implementing TCP and allowing for messages to be conveniently
sent without a large serialisation header.
The for this instance.
The on which to send and receive data.
The for this instance.
Initializes a new instance of the class.
The TCP client to use.
Whether to skip the initialisation process for the underlying . If true
will have to be manually called later.
The local for the .
The remote for the .
Establishes a with the remote endpoint.
The action to perform upon connection.
Since TCP ensures the ordering of packets, we will always receive the before
a of the unknown type. Thus, it is theoretically impossible that this method is called for
a instance. Still gotta handle it though :),
Builds upon the class, implementing UDP and allowing for messages to be conveniently
sent without a large serialisation header.
The for this instance.
The for this instance.
The local endpoint for the .
The remote endpoint for the
Stopwatch to measure the RTT for ping packets.
Cache of all received bytes.
Initializes a new instance of the class.
The UDP client to use.
The remote end point.
Whether the will have a write lock.
Whether to skip the call to .
The local for the .
The remote for the .
Whether a checksum should be created for each UDP packet sent.
Whether the connection has a write lock in place.
Resets the and sends a new packet, so that the RTT can
be measured. The RTT will be placed in the property.
Handler for packets.
The response packet received.
The connection that sent the response.
Same as a .net dictionary. But just working in both directions.
The type of the first dictionary.
The type of the second dictionary.
Gets or sets the with the specified u.
The u.
T.
Gets or sets the with the specified t.
The t.
U.
The keys held in the dictionary.
The values held in the dictionary.
Maps individual s to their unique ID value, so that they can be sent across the network and
then deserialised. Also maps the s IDs to the relevant ,
should one be registered for that packet.
Maps each packet type to a dictionary containing registered objects which want to receive packets
(i.e. Handlers) of the given type and their individual IDs.
Maps each packet id to a tuple, holding the packet handler method and the object on which the handler should be called.
Maps a key to a packet handler delegate method.
Gets the method which handles packets for the primitive type
identified by the given key.
The key for whose primitive type to get a handler delegate.
The handler delegate associated with the given key.
Gets the method which handles packets with the given ID.
The ID of the packet whose handler delegate to return.
The handler delegate associated with packets of the given id.
Gets the method which handles packets of the given .
The type of packet whose handler delegate to return.
The handler delegate registered for the given type.
Gets the ID associated with the given packet type and handler instance.
The packet type whose handler ID to return.
The handler whose ID to return.
The ID associated with the given handler of the given packet type.
Checks whether the given packet has a registered handler method.
The packet for which to search for handler delegate methods.
Whether any delegate methods have been registered for the packet.
Restores the to the state of the given packet handler map.
The whose state to restore to.
Registers the given delegate method to be used for the given packet type.
The type of packet for which the delegate method will be used.
The delegate method to be invoked when the given packet is received.
The handler object instance on which the delegate method will be invoked.
Registers the given method to be used for the given packet type.
The type of packet for which the delegate method will be used.
The delegate method to be invoked when the given packet is received.
The handler object instance on which the delegate method will be invoked.
Registers the given static delegate method to be used for all packets of the given packet type.
The type of packet for which the delegate method will be used.
The static delegate method to be invoked when the given packet is received.
Registers the given method to be used for all packets of the given packet type.
The type of packet for which the delegate method will be used.
The static delegate method to be invoked when the given packet is received.
Registers the given method to be used for all packets that arrive with the given key.
The key that identifies the primitive type.
The delegate method to invoke for incoming packets with the given key.
Deregisters packet handlers for the given packet type, on the given packet handler instance.
The type of packet for which to deregister any packet handlers.
The handler instance for which to deregisters packet handlers.
Deregisters all static packet handlers for the given packet type.
The packet type for which to deregister all packet handlers.
Deregisters all static packet handlers for the given key.
The key for which to deregister packet handlers.
Provides methods for the generation of unique identifiers for objects.
Maps a to its cached, unique ID via a thread-safe dictionary.
Generates a unique identifier for the given
The type for which to generate a unique ID.
The unique ID.
Returns the unique identifier associated with the given type.
The type whose ID to get.
The unique ID.
Thrown if the method is called before an ID is present. This occurs if a previous call to
was not made
for the given type, and thus no ID actually exists.