direct.distributed.ConnectionRepository
from direct.distributed.ConnectionRepository import ConnectionRepository, GCTrigger
Inheritance diagram
- class ConnectionRepository(connectMethod, config, hasOwnerView=False, threadedNet=None)[source]
Bases:
DoInterestManager
,DoCollectionManager
,CConnectionRepository
This is a base class for things that know how to establish a connection (and exchange datagrams) with a gameserver. This includes ClientRepository and AIRepository.
- CM_HTTP = 0
- CM_NATIVE = 2
- CM_NET = 1
- GarbageCollectTaskName = 'allowGarbageCollect'
- GarbageThresholdTaskName = 'adjustGarbageCollectThreshold'
- connect(self, serverList, successCallback=None, successArgs=[], failureCallback=None, failureArgs=[])[source]
Attempts to establish a connection to the server. May return before the connection is established. The two callbacks represent the two functions to call (and their arguments) on success or failure, respectively. The failure callback also gets one additional parameter, which will be passed in first: the return status code giving reason for failure, if it is known.
- gcNotify = <direct.directnotify.Notifier.Notifier object>
- httpConnectCallback(self, ch, serverList, serverIndex, successCallback, successArgs, failureCallback, failureArgs)[source]
- importModule(self, dcImports, moduleName, importSymbols)[source]
Imports the indicated moduleName and all of its symbols into the current namespace. This more-or-less reimplements the Python import command.
- notify = <direct.directnotify.Notifier.Notifier object>
- readDCFile(self, dcFileNames=None)[source]
Reads in the dc files listed in dcFileNames, or if dcFileNames is None, reads in all of the dc files listed in the Config.prc file.
- taskChain = None
- taskPriority = -30