Network Connection is a high-level API class that encapsulates a network connection. `NetworkClient` objects have a single connection, and `NetworkServer`'s have multiple connections - one from each client. Network Connections have the ability to send byte arrays or serialized objects as network messages.
## Constructors
-**NetworkConnection**()
-**NetworkConnection**(string networkAddress)
-**NetworkConnection**(string networkAddress, int networkConnectionId)
The NetworkConnection class has virtual functions that are called when data is sent to the transport layer or received from the transport layer. These functions allow specialized versions of NetworkConnection to inspect or modify this data, or even route it to different sources. These function are shown below, including the default behaviour:
An example use of these function is to log the contents of incoming and outgoing packets. Below is an example of a `DebugConnection` class that is derived from `NetworkConnection` that logs the first 50 bytes of packets to the console. To use a class like this call the `SetNetworkConnectionClass()` function on a `NetworkClient` or `NetworkServer`.