Start() - Starts listening for incoming connections.
Stop() - Stops listening for incoming connections.
Private Methods
listen() - Polls the TcpListener for pending connections, accepts, and generates events with Network objects.
Private Properties
bool Listen - Locks access for listenCheck.
Private Members
TcpListener tcpListener - Listens for incoming connections.
IPAddress ip - The local incoming IP address.
int port - The local incoming port.
Thread pendingThread - Runs listen().
bool listenCheck - Tells the Thread to stop.
Events
Connected
Rationale
After creating Network, we realized that stopping the listener and starting a new one was rejecting incoming connections, so we needed something that could always listen and queue pending connection attempts without losing them.