Author: Bn880, Dinger and Spinor
of the CoC
Date: 2004/05/06 Revised 22/08/2004
Overview
Installation
Loading the library
List of functions
List of resources
Description
History
Conversion
The CoC Network Library is provided with the
CoC Network Services add-on or mission scripts and it includes the CoC Public Array global array sharing system.
For further questions visit our forums at
The Chain of Command.
Version: 2.0 REV. 2
Dependencies: COC_LIBNUMSYS
(bundled in CoC Network Services)
Included in: CoC Network Services & Add-on
CoC_NPA_PollInterval = 2; CoC_MaxRetry = 2; |
;;;CoC_PublicArrays = ["PArray1","PArray2"]; ;;;CoC_ClientsReady = false; ;;;CoC_NSFunTable=["myTxFunc1","myTxFunc2"] call loadFile "Network\init.sqf" ; INIT CODE NOT DEPENDING ON NETWORK EXECUTES NOW @CoC_ClientsReady ; INIT CODE CONTINUES FOR NETWORK DEPENDENT CODE |
example of changed init.sqs:
CoC_NSDebug = true; CoC_MaxRetry = 2; ;;;CoC_PublicArrays = ["PArray1","PArray2"]; ;;;CoC_NSFunTable=["myTxFunc1","myTxFunc2"] ;;;CoC_ClientsReady = false; call loadFile "Network\init.sqf" ; INIT CODE NOT DEPENDING ON NETWORK EXECUTES NOW @CoC_ClientsReady ; INIT CODE CONTINUES FOR NETWORK DEPENDENT CODE |
The library is loaded automatically only as part of the
CoC Network Services.
The global variable CoC_LIBNETWORK equals 2.0 if the library is loaded.
See Installation
.
fArrayToVar
fDefined
fNGetType
fNCall
fNClearQ
fNGetNode
fNPing
fNPrint
fNRemoteCall
fNSend
fNSendAll
fNSendClients
fNSendGlobal
fNSendServer
fNSendRange
fPublicArray
fReceiveArray
fVarToArray
CoC_AbortLength
CoC_AckWaitTime
CoC_ClientChannel
CoC_ClientList
CoC_ClientsReady
CoC_ConnectTimeout
CoC_ConWaitTime
CoC_DataWaitTime
CoC_InfoWaitTime
CoC_isClient
CoC_isServer
CoC_isServerClient
CoC_isServerDedicated
CoC_MaxRetry
CoC_NPA_PollInterval
CoC_NSFunTable
CoC_PeerList
CoC_PortBusSize
CoC_PortNumber
CoC_PortWaitTime
CoC_PublicArrays
The purpose of the library is to allow OFP mission or system designers to establish point to point or global communications with every network node in a network session, and to have a means to transfer any information in a manner that is as efficient as possible given the limitations of the engine. Since version 2.0 the fNSend* (excluding global) functions will allow the transmission of all OFP data types to specific functions on any destination node(s) using one point to point communication session to each network node. For reference here are all the OFP data types that these functions will send:
The fPublicArray function will allow for the sharing of arrays to all network nodes via a single network exchange(as opposed to multiple point to point), the public arrays can be filled with any of the following data types:
The fNSendGlobal function will allow the transmission of the following data types to selected nodes (or all) via a single network exchange (as opposed to multiple point to point exchanges):
The fNRemoteCall function offers a third and another unique method of sending information across. It works similarly to fNSendGlobal that it does only one network transaction per call (no matter how many destinations), however it simply executes the passed in command string remotely (entire command must be 4000 chars or less). The following data types can be embedded and transmitted in fNRemoteCall:
Added: PublicArray global array sharing system added to Network Services.
Added: Online documentation for system.
Added: functions fNPrint, fNSendAll, fNSendClients, fNSendServer, fNSendRange plus Public Array function fPublicArray and others.
Changed/Added: Configuration variables renamed to CoC_AbortLength, CoC_AckWaitTime,CoC_ConnectTimeout, CoC_ConWaitTime, CoC_DataWaitTime, CoC_InfoWaitTime, CoC_MaxRetry, CoC_PortBusSize, CoC_PortNumber, CoC_PortWaitTime and made global thus allowing configuration from init.sqs of mission.
Changed: All variable prefixes changed from "rN" to "CoC_", this includes the resources and CoC_Server (previously Server), CoC_Client (previously rNClient), CoC_ClientIndex (previously rNClientIndex).
Changed: Internal communication variable prefix shortened to "Q_" instead of "rNC_" thus improving send performance.
Changed: Almost all handshaking is now performed after mission start instead of briefing to decrease the network flood effect in large MP missions. However this will require longer CoC_ConnectionTimeout settings for bad modem connections.
Fixed: rNisServerClient now functions as expected
Fixed: EULA Revised to remove network usage clause and permit free use
of the product on any computer or network.
Added: Radio Charlie added to template missions to show useful resources.
Same as Script 2.0
Same as Script 1.2 and: