TITLEDarkNet Logo
DarkNet
Home
Purchase
Contact
In Action
 
General
Performance
Ease of use
Asynchronous
Error System
Documentation
Demo Code
 
Protocol
Instances
Packets
Encryption
Compatibility
Disconnecting
Demo - Cube World
 
NAT Traversal
 
Input
Output
 
Firewall

 

 

Asynchronous

All DarkNet commands have a non blocking option so that your application can continue operating whilst a DarkNet operation completes.

This is most useful when connecting to a server. Whilst connecting a handshaking process completes behind the scenes and this can take several seconds on slow connections.

There are two ways of using mnConnect in DarkNet. Note that all other commands that may take several seconds to complete operate in a similar way.

1. Synchronous

mnConnect will not return until the specified timeout length has expired, or the connection has completed:

Diagram showing mnConnect used synchronously

2. Asynchronous

mnConnect returns straight away and mnPollConnect is used to determine the status of the connection process. mnStopConnect can be used to halt the connection process prematurely.

Diagram showing mnConnect used asyncronously

 

© Copyright Michael Pryor