Panda3D
|
Classes | |
class | Client |
class | Object |
Public Member Functions | |
def | __init__ |
def | clientHardDisconnectTask |
def | flushTask |
def | getDoIdBase |
def | getTcpHeaderSize |
def | handleClientCreateObject |
def | handleClientDeleteObject |
def | handleClientDisconnect |
def | handleClientObjectSetZone |
def | handleClientObjectUpdateField |
def | handleClientSetInterest |
def | handleDatagram |
def | handleMessageType |
def | importModule |
def | listenerPoll |
def | readDCFile |
def | readerPollOnce |
def | readerPollUntilEmpty |
def | sendDoIdRange |
def | sendToAllExcept |
def | sendToZoneExcept |
def | setObjectZone |
def | setTcpHeaderSize |
def | updateClientInterestZones |
Public Attributes | |
clientsByConnection | |
clientsByDoIdBase | |
cw | |
dcFile | |
dclassesByName | |
dclassesByNumber | |
dcSuffix | |
doIdRange | |
hashVal | |
idAllocator | |
lastConnection | |
needsFlush | |
objectsByZoneId | |
qcl | |
qcm | |
qcr | |
tcpRendezvous | |
zonesToClients | |
Static Public Attributes | |
tuple | notify = DirectNotifyGlobal.directNotify.newCategory("ServerRepository") |
This maintains the server-side connection with a Panda server. It is only for use with the Panda LAN server provided by CMU.
def __init__ | ( | self, | |
tcpPort, | |||
serverAddress = None , |
|||
udpPort = None , |
|||
dcFileNames = None , |
|||
threadedNet = None |
|||
) |
def clientHardDisconnectTask | ( | self, | |
task | |||
) |
client did not tell us he was leaving but we lost connection to him, so we need to update our data and tell others
def flushTask | ( | self, | |
task | |||
) |
This task is run periodically to flush any connections that might need it. It's only necessary in cases where collect-tcp is set true (if this is false, messages are sent immediately and do not require periodic flushing).
def getDoIdBase | ( | self, | |
doId | |||
) |
Given a doId, return the corresponding doIdBase. This will be the owner of the object (clients may only create object doId's within their assigned range).
def getTcpHeaderSize | ( | self | ) |
Returns the current setting of TCP header size. See setTcpHeaderSize().
def handleClientCreateObject | ( | self, | |
datagram, | |||
dgi | |||
) |
client wants to create an object, so we store appropriate data, and then pass message along to corresponding zones
def handleClientDeleteObject | ( | self, | |
datagram, | |||
doId | |||
) |
client deletes an object, let everyone who has interest in the object's zone know about it.
def handleClientDisconnect | ( | self, | |
client | |||
) |
def handleClientObjectSetZone | ( | self, | |
datagram, | |||
dgi | |||
) |
The client is telling us the object is changing to a new zone.
def handleClientObjectUpdateField | ( | self, | |
datagram, | |||
dgi, | |||
targeted = False |
|||
) |
Received an update request from a client.
def handleClientSetInterest | ( | self, | |
client, | |||
dgi | |||
) |
The client is specifying a particular set of zones it is interested in.
def handleDatagram | ( | self, | |
datagram | |||
) |
switching station for messages
def handleMessageType | ( | self, | |
msgType, | |||
di | |||
) |
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.
def listenerPoll | ( | self, | |
task | |||
) |
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.
def readerPollOnce | ( | self | ) |
checks for available messages to the server
def readerPollUntilEmpty | ( | self, | |
task | |||
) |
continuously polls for new messages on the server
def sendDoIdRange | ( | self, | |
client | |||
) |
sends the client the range of doid's that the client can use
def sendToAllExcept | ( | self, | |
datagram, | |||
exceptionList | |||
) |
sends a message to all connected clients, except for clients on exceptionList.
def sendToZoneExcept | ( | self, | |
zoneId, | |||
datagram, | |||
exceptionList | |||
) |
sends a message to everyone who has interest in the indicated zone, except for the clients on exceptionList.
def setObjectZone | ( | self, | |
owner, | |||
object, | |||
zoneId | |||
) |
def setTcpHeaderSize | ( | self, | |
headerSize | |||
) |
Sets the header size of TCP packets. At the present, legal values for this are 0, 2, or 4; this specifies the number of bytes to use encode the datagram length at the start of each TCP datagram. Sender and receiver must independently agree on this.
def updateClientInterestZones | ( | self, | |
client | |||
) |
Something about the client has caused its set of interest zones to potentially change. Recompute them.
tuple notify = DirectNotifyGlobal.directNotify.newCategory("ServerRepository") [static] |