Communication Class Reference

Collaboration diagram for Communication:

Collaboration graph
[legend]
List of all members.

Public Member Functions

(id) - initWithUniverse:baseUdpPort:
(void) - subscribeToNotifications
(void) - run
(void) - run:
(void) - setMultiThreaded:
(void) - setPing:withResponse:
(FeatureList *) - featureList
(PingStats *) - pingStats
(void) - setGhostSlot:
(void) - setCommStatus:
(void) - setCommMode:
(void) - setCommModeRequest:
(void) - setShortVersion:
(void) - setReceiveShort:
(int) - packetsReceived
(void) - increasePacketsReceived
(void) - decreasePacketsReceived
(void) - sendShortPacketWithId:
(void) - sendShortPacketNoForceWithId:state:
(void) - sendShortPacketWithId:boolState:
(void) - sendShortPacketWithId:state:
(void) - sendServerPacketWithBuffer:length:
(void) - resetForce
(int) - forceCheckFlags:force:type:
(int) - forceCheckValue:force:type:
(int) - forceCheckTractFlag:force:type:
(void) - checkForce
(void) - cleanUp:
(void) - readFromServer
(void) - readFromServer:
(void) - periodicReadFromServer
(void) - sendSpeedReq:
(void) - sendDockingReq:
(void) - sendCloakReq:
(void) - sendRefitReq:
(void) - sendDirReq:
(void) - sendPhaserReq:
(void) - sendTorpReq:
(void) - sendPlasmaReq:
(void) - sendShieldReq:
(void) - sendBombReq:
(void) - sendBeamReq:
(void) - sendRepairReq:
(void) - sendOrbitReq:
(void) - sendQuitReq:
(void) - sendCoupReq:
(void) - sendByeReq:
(void) - sendPractrReq:
(void) - sendDetonateReq:
(void) - sendPlaylockReq:
(void) - sendPlanlockReq:
(void) - sendResetStatsReq:
(void) - sendWarReq:
(void) - sendTractorOnReq:
(void) - sendTractorOffReq:
(void) - sendRepressorOnReq:
(void) - sendRepressorOffReq:
(void) - sendTeamReq:
(void) - sendDetMineReq:
(void) - sendFeature:
(void) - sendLoginReq:
(void) - sendPingReq:
(void) - sendServerPingResponse:
(void) - sendMessage:
(void) - sendUpdatePacket:
(void) - sendThreshold:
(void) - sendDetonateMyTorpsReq:
(void) - sendOptionsPacket:
(int) - sendPickSocketReq
(int) - sendPickSocketReq:
(void) - sendUdpReq:
(void) - sendShortReq:
(void) - sendUdpVerify:
(bool) - callServer:port:
(bool) - startCommunicationThread
(bool) - stopCommunicationThread
(bool) - connectToServerUsingPort:
(bool) - connectToServerUsingPort:expectedHost:
(bool) - connectToServerUsingNextPort
(int) - sendSocketVersionAndNumberReq:
(bool) - openUdpConn
(void) - closeUdpConn

Protected Attributes

int commMode
int commStatus
int commModeRequest
int shortVersion
bool receiveShort
int ghostSlot
FeatureList * fList
PingStats * pStats
Universe * universe
UdpStats * udpStats
LLNotificationCenter * notificationCenter

Detailed Description

Definition at line 28 of file Communication.h.


Member Function Documentation

- (int) forceCheckFlags: (int)  flag
force: (int)  force
type: (char)  type 

If something we want to happen hasn't yet, send it again. The low byte is the request, the high byte is a max count. When the max count reaches zero, the client stops trying. Checking is done with a macro for speed & clarity.

Definition at line 441 of file Communication.m.

References sendShortPacketNoForceWithId:state:, and universe.

Referenced by checkForce.

Here is the call graph for this function:

- (void) sendPingReq: (NSNumber *)  start  

sendRSAResponse not implemented yet

void sendRSAResponse(byte[] data) { buffer[0] = CP_RSA_KEY; query the socket to determine the remote host (ATM) System.arraycopy(server.getAddress(), 0, data, 0, 4); int port = tcp_socket.getPort(); data[4] = (char)((port >>> 8) & 0xFF); data[5] = (char)(port & 0xFF);

byte[] response = RSA.generateRSAResponse(data); System.arraycopy(response, 0, buffer, 4, response.length); sendServerPacket(4 + response.length); }

Definition at line 807 of file Communication.m.

References sendServerPacketWithBuffer:length:.

Here is the call graph for this function:

- (int) sendSocketVersionAndNumberReq: (int)  port  

pickSocket

Definition at line 916 of file Communication.m.

References sendPickSocketReq:.

Referenced by callServer:port:, and connectToServerUsingPort:expectedHost:.

Here is the call graph for this function:

- (bool) startCommunicationThread  

Definition at line 1275 of file Communication.m.

References LLThreadWorker::workOn:withSelector:withObject:didEndSelector:.

Here is the call graph for this function:


The documentation for this class was generated from the following files:
Generated on Fri Jul 28 19:15:38 2006 for MacTrek by  doxygen 1.4.7