mnStart

This loads the DarkNet networking module and retrieves information about local devices.

mnFinish(-1) does the opposite of mnStart, and unloads the networking module.

After using mnStart, mnConnect (client state), mnStartServer (server state) or mnStartBroadcast (broadcast state) can be used to initialize the specified instance.

Parameters

int Number_of_instances: Number of instances to create. Instance identifiers range from 0 to one less than the value of this parameter. See networking for an explanation of instances.

int Number_of_threads: This is used to set the number of threads to be created to deal with receiving of data. For maximum efficiency this should be set to equal the number of physical cores on the computer. E.g. a core 2 duo should have this parameter set to two.

Set this parameter to 0 and DarkNet will automatically set this to the number of physical cores on the system.

Returns (Integer)

0 if no error occurred

-1 if an error occurred.

Present in

DBP

C++

.Net




This page is in the following sections:
(2) Networking Commands
(1) Networking
(0) DarkNet Help