__init__ def __init__(self, connectMethod, config, hasOwnerView=False) Undocumented function. |
_adjustGcThreshold def _adjustGcThreshold(self, task) Undocumented function. |
_garbageCollect def _garbageCollect(self, task=None) Undocumented function. |
checkHttp def checkHttp(self) Undocumented function. |
connect def connect(self, serverList, successCallback=None, successArgs=[], failureCallback=None, failureArgs=[]) 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. |
disconnect def disconnect(self) Closes the previously-established connection. |
generateGlobalObject def generateGlobalObject(self, doId, dcname, values=None) Undocumented function. |
getServerAddress def getServerAddress(self) Undocumented function. |
handleDatagram def handleDatagram(self, di) Undocumented function. |
handleReaderOverflow def handleReaderOverflow(self) Undocumented function. |
httpConnectCallback def httpConnectCallback(self, ch, serverList, serverIndex, successCallback, successArgs, failureCallback, failureArgs) Undocumented function. |
importModule def importModule(self, dcImports, moduleName, importSymbols) Imports the indicated moduleName and all of its symbols into the current namespace. This more-or-less reimplements the Python import command. |
lostConnection def lostConnection(self) Undocumented function. |
networkPlugPulled def networkPlugPulled(self) Undocumented function. |
pullNetworkPlug def pullNetworkPlug(self) Undocumented function. |
readDCFile def readDCFile(self, dcFileNames=None) Reads in the dc files listed in dcFileNames, or if dcFileNames is None, reads in all of the dc files listed in the Configrc file. |
readerPollOnce def readerPollOnce(self) Undocumented function. |
readerPollUntilEmpty def readerPollUntilEmpty(self, task) Undocumented function. |
restoreNetworkPlug def restoreNetworkPlug(self) Undocumented function. |
send def send(self, datagram) Undocumented function. |
startReaderPollTask def startReaderPollTask(self) Undocumented function. |
stopReaderPollTask def stopReaderPollTask(self) Undocumented function. |
CConnectionRepository CConnectionRepository::CConnectionRepository(bool has_owner_view = (0)); Description: |
abandonMessageBundles void CConnectionRepository::abandon_message_bundles(void); Description: throw out any msgs that have been queued up for message bundles |
bundleMsg void CConnectionRepository::bundle_msg(Datagram const &dg); Description: |
checkDatagram bool CConnectionRepository::check_datagram(void); Description: Returns true if a new datagram is available, false otherwise. If the return value is true, the new datagram may be retrieved via get_datagram(), or preferably, with get_datagram_iterator() and get_msg_type(). |
considerFlush bool CConnectionRepository::consider_flush(void); Description: Sends the most recently queued data if enough time has elapsed. This only has meaning if set_collect_tcp() has been set to true. |
disconnect void CConnectionRepository::disconnect(void); Description: Closes the connection to the server. |
flush bool CConnectionRepository::flush(void); Description: Sends the most recently queued data now. This only has meaning if set_collect_tcp() has been set to true. |
getClientDatagram bool CConnectionRepository::get_client_datagram(void) const; Description: Returns the client_datagram flag. |
getCw ConnectionWriter &CConnectionRepository::get_cw(void); Description: Returns the ConnectionWriter object associated with the repository. |
getDatagram void CConnectionRepository::get_datagram(Datagram &dg); Description: Fills the datagram object with the datagram most recently retrieved by check_datagram(). |
getDatagramIterator void CConnectionRepository::get_datagram_iterator(DatagramIterator &di); Description: Fills the DatagramIterator object with the iterator for the datagram most recently retrieved by check_datagram(). This iterator has already read past the datagram header and the message type, and is positioned at the beginning of data. |
getDcFile DCFile &CConnectionRepository::get_dc_file(void); Description: Returns the DCFile object associated with this repository. |
getHandleCUpdates bool CConnectionRepository::get_handle_c_updates(void) const; Description: Returns true if this repository will process distributed updates internally in C++ code, or false if it will return them to Python. |
getMsgChannel unsigned long int CConnectionRepository::get_msg_channel(int offset = (0)) const; Description: Returns the channel from which the current message was sent, according to the datagram headers. This information is not available to the client. |
getMsgChannelCount int CConnectionRepository::get_msg_channel_count(void) const; Undocumented function. |
getMsgSender unsigned long int CConnectionRepository::get_msg_sender(void) const; Description: Returns the sender ID of the current message, according to the datagram headers. This information is not available to the client. |
getMsgType unsigned int CConnectionRepository::get_msg_type(void) const; INLINE unsigned char get_sec_code() const; Description: Returns the security code associated with the current message, according to the datagram headers. This information is not available to the client. INLINE unsigned char CConnectionRepository:: get_sec_code() const { return _sec_code; } Description: Returns the type ID of the current message, according to the datagram headers. |
getOverflowEventName static string const &CConnectionRepository::get_overflow_event_name(void); Description: Returns event string that will be thrown if the datagram reader queue overflows. |
getQcm QueuedConnectionManager &CConnectionRepository::get_qcm(void); Description: Returns the QueuedConnectionManager object associated with the repository. |
getQcr QueuedConnectionReader &CConnectionRepository::get_qcr(void); Description: Returns the QueuedConnectionReader object associated with the repository. |
getSimulatedDisconnect bool CConnectionRepository::get_simulated_disconnect(void) const; Description: Returns the simulated disconnect flag. While this is true, no datagrams will be retrieved from or sent to the server. The idea is to simulate a temporary network outage. |
getStream SocketStream *CConnectionRepository::get_stream(void); Description: Returns the SocketStream that internally represents the already-established HTTP connection. Returns NULL if there is no current HTTP connection. |
getVerbose bool CConnectionRepository::get_verbose(void) const; Description: Returns the current setting of the verbose flag. When true, this describes every message going back and forth on the wire. |
getWantMessageBundling bool CConnectionRepository::get_want_message_bundling(void) const; Description: Returns true if message bundling enabled |
hasOwnerView bool CConnectionRepository::has_owner_view(void) const; Description: Returns true if this repository can have 'owner' views of distributed objects. |
isBundlingMessages bool CConnectionRepository::is_bundling_messages(void) const; Description: Returns true if repository is queueing outgoing messages into a message bundle |
isConnected bool CConnectionRepository::is_connected(void); Description: Returns true if the connection to the gameserver is established and still good, false if we are not connected. A false value means either (a) we never successfully connected, (b) we explicitly called disconnect(), or (c) we were connected, but the connection was spontaneously lost. |
sendDatagram bool CConnectionRepository::send_datagram(Datagram const &dg); Description: Queues the indicated datagram for sending to the server. It may not get sent immediately if collect_tcp is in effect; call flush() to guarantee it is sent now. |
sendMessageBundle void CConnectionRepository::send_message_bundle(unsigned int channel, unsigned int sender_channel); Description: Send network messages queued up since startMessageBundle was called. |
setClientDatagram void CConnectionRepository::set_client_datagram(bool client_datagram); Description: Sets the client_datagram flag. If this is true, incoming datagrams are not expected to be prefixed with the server routing information like message sender, channel number, etc.; otherwise, these server fields are parsed and removed from each incoming datagram. |
setConnectionHttp void CConnectionRepository::set_connection_http(HTTPChannel *channel); Description: Once a connection has been established via the HTTP interface, gets the connection and uses it. The supplied HTTPChannel object must have a connection available via get_connection(). |
setHandleCUpdates void CConnectionRepository::set_handle_c_updates(bool handle_c_updates); Description: Set true to specify this repository should process distributed updates internally in C++ code, or false if it should return them to Python. |
setPythonRepository void CConnectionRepository::set_python_repository(PyObject *python_repository); Description: Records the pointer to the Python class that derives from CConnectionRepository. This allows the C++ implementation to directly manipulation some python structures on the repository. |
setSimulatedDisconnect void CConnectionRepository::set_simulated_disconnect(bool simulated_disconnect); Description: Sets the simulated disconnect flag. While this is true, no datagrams will be retrieved from or sent to the server. The idea is to simulate a temporary network outage. |
setVerbose void CConnectionRepository::set_verbose(bool verbose); Description: Directly sets the verbose flag. When true, this describes every message going back and forth on the wire. |
setWantMessageBundling void CConnectionRepository::set_want_message_bundling(bool flag); Description: Enable/disable outbound message bundling |
startMessageBundle void CConnectionRepository::start_message_bundle(void); Description: Send a set of messages to the state server that will be processed atomically. For instance, you can do a combined setLocation/setPos and prevent race conditions where clients briefly get the setLocation but not the setPos, because the state server hasn't processed the setPos yet |
toggleVerbose void CConnectionRepository::toggle_verbose(void); Description: Toggles the current setting of the verbose flag. When true, this describes every message going back and forth on the wire. |
tryConnectNet bool CConnectionRepository::try_connect_net(URLSpec const &url); Description: Uses Panda's "net" library to try to connect to the server and port named in the indicated URL. Returns true if successful, false otherwise. |
__init__ def __init__(self) Undocumented function. |
__verbose def __verbose(self) Undocumented function. |
_considerRemoveInterest def _considerRemoveInterest(self, handle) Consider whether we should cull the interest set. |
_getAddInterestEvent def _getAddInterestEvent(self) Undocumented function. |
_getAnonymousEvent def _getAnonymousEvent(self, desc) Undocumented function. |
_getInterestState def _getInterestState(self, handle) Undocumented function. |
_getNextContextId def _getNextContextId(self) Undocumented function. |
_getNextHandle def _getNextHandle(self) Undocumented function. |
_getRemoveInterestEvent def _getRemoveInterestEvent(self) Undocumented function. |
_sendAddInterest def _sendAddInterest(self, handle, contextId, parentId, zoneIdList, description, action=None) Part of the new otp-server code. handle is a client-side created number that refers to a set of interests. The same handle number doesn't necessarily have any relationship to the same handle on another client. |
_sendRemoveAIInterest def _sendRemoveAIInterest(self, handle) handle is a bare int, NOT an InterestHandle. Use this to close an AI opened interest. |
_sendRemoveInterest def _sendRemoveInterest(self, handle, contextId) handle is a client-side created number that refers to a set of interests. The same handle number doesn't necessarily have any relationship to the same handle on another client. |
addAutoInterest def addAutoInterest(self, parentId, zoneIdList, description) Look into a (set of) zone(s). |
addInterest def addInterest(self, parentId, zoneIdList, description, event=None) Look into a (set of) zone(s). |
alterInterest def alterInterest(self, handle, parentId, zoneIdList, description=None, event=None) Removes old interests and adds new interests. Note that when an interest is changed, only the most recent change's event will be triggered. Previous events are abandoned. If this is a problem, consider opening multiple interests. |
cleanupWaitAllInterestsComplete def cleanupWaitAllInterestsComplete(self) Undocumented function. |
closeAutoInterests def closeAutoInterests(self, obj) Undocumented function. |
getAllInterestsCompleteEvent def getAllInterestsCompleteEvent(self) Undocumented function. |
handleInterestDoneMessage def handleInterestDoneMessage(self, di) This handles the interest done messages and may dispatch an event |
isValidInterestHandle def isValidInterestHandle(self, handle) Undocumented function. |
noNewInterests def noNewInterests(self) Undocumented function. |
openAutoInterests def openAutoInterests(self, obj) Undocumented function. |
queueAllInterestsCompleteEvent def queueAllInterestsCompleteEvent(self, frames=5) Undocumented function. |
removeAutoInterest def removeAutoInterest(self, handle) Stop looking in a (set of) zone(s) |
removeInterest def removeInterest(self, handle, event=None) Stop looking in a (set of) zone(s) |
resetInterestStateForConnectionLoss def resetInterestStateForConnectionLoss(self) Undocumented function. |
setAllInterestsCompleteCallback def setAllInterestsCompleteCallback(self, callback) Undocumented function. |
setNoNewInterests def setNoNewInterests(self, flag) Undocumented function. |
updateInterestDescription def updateInterestDescription(self, handle, desc) Undocumented function. |
__init__ def __init__(self) Undocumented function. |
_compareDistance def _compareDistance(self, do1, do2) Undocumented function. |
_getDistanceFromLA def _getDistanceFromLA(self, do) Undocumented function. |
_printObjects def _printObjects(self, table) Undocumented function. |
_returnObjects def _returnObjects(self, table) Undocumented function. |
addDOToTables def addDOToTables(self, do, location=None, ownerView=False) Undocumented function. |
callbackWithDo def callbackWithDo(self, doId, callback) Undocumented function. |
callbackWithOwnerView def callbackWithOwnerView(self, doId, callback) Undocumented function. |
countObjects def countObjects(self, classType) Counts the number of objects of the given type in the repository (for testing purposes) |
deleteDistributedObjects def deleteDistributedObjects(self) Undocumented function. |
deleteObjectLocation def deleteObjectLocation(self, object, parentId, zoneId) Undocumented function. |
doByDistance def doByDistance(self) Undocumented function. |
doFind def doFind(self, str) Returns list of distributed objects with matching str in value. |
doFindAll def doFindAll(self, str) Returns list of distributed objects with matching str in value. |
doFindAllMatching def doFindAllMatching(self, str) Returns list of distributed objects with matching str in value. |
dosByDistance def dosByDistance(self) Undocumented function. |
findAnyOfType def findAnyOfType(self, type) Undocumented function. |
getAllOfType def getAllOfType(self, type) Undocumented function. |
getDo def getDo(self, doId) Undocumented function. |
getDoIdList def getDoIdList(self, parentId, zoneId=None, classType=None) Undocumented function. |
getDoList def getDoList(self, parentId, zoneId=None, classType=None) parentId is any distributed object id. zoneId is a uint32, defaults to None (all zones). Try zone 2 if you're not sure which zone to use (0 is a bad/null zone and 1 has had reserved use in the past as a no messages zone, while 2 has traditionally been a global, uber, misc stuff zone). dclassType is a distributed class type filter, defaults to None (no filter). If dclassName is None then all objects in the zone are returned; otherwise the list is filtered to only include objects of that type. |
getDoTable def getDoTable(self, ownerView) Undocumented function. |
getObjectsInZone def getObjectsInZone(self, parentId, zoneId) returns dict of doId:distObj for a zone. returned dict is safely mutable. |
getObjectsOfClassInZone def getObjectsOfClassInZone(self, parentId, zoneId, objClass) returns dict of doId:object for a zone, containing all objects that inherit from 'class'. returned dict is safely mutable. |
getOwnerView def getOwnerView(self, doId) Undocumented function. |
getOwnerViewDoIdList def getOwnerViewDoIdList(self, classType) Undocumented function. |
getOwnerViewDoList def getOwnerViewDoList(self, classType) Undocumented function. |
handleObjectLocation def handleObjectLocation(self, di) Undocumented function. |
handleSetLocation def handleSetLocation(self, di) Undocumented function. |
hasOwnerViewDoId def hasOwnerViewDoId(self, doId) Undocumented function. |
isValidLocationTuple def isValidLocationTuple(self, location) Undocumented function. |
printObjectCount def printObjectCount(self) Undocumented function. |
removeDOFromTables def removeDOFromTables(self, do) Undocumented function. |
webPrintObjectCount def webPrintObjectCount(self) Undocumented function. |