Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

cClientPacket Class Reference

Base class of all packets send from client to server. More...

#include <packets.h>

Inheritance diagram for cClientPacket:

cPacket cPacketAddItemIntoCont cPacketAttackRequest cPacketCharProfileReq cPacketCharProfileReqOnly cPacketCreateCharacter cPacketDeleteCharacter cPacketDisconnectNotification cPacketDoubleClick cPacketDragging cPacketDropItem cPacketGeneralInfo< cClientPacket > cPacketGodModeToggle cPacketLogin cPacketMenuSelection cPacketPickUpItem cPacketPlayerStatus cPacketResponseToDialog cPacketRessMenu cPacketSingleClick cPacketTalkRequest cPacketWear cPacketWornItem List of all members.

Public Methods

virtual void receive (NXWCLIENT ps)
 Receive packet from client.

virtual ~cClientPacket ()

Protected Methods

char * getBeginValidForReceive ()
 get pointer after the packet command ( it's read before )

void getFromSocket (NXWSOCKET socket, char *b, int size)
 get From Client

void getStringFromSocket (NXWSOCKET socket, string &s, int lenght)
 read a string from socket buffer

void getUnicodeStringFromSocket (NXWSOCKET s, wstring &c, int size=-1)
 read an unicode string from socket buffer


Detailed Description

Base class of all packets send from client to server.

Author:
Endymion
Since:
0.83a


Constructor & Destructor Documentation

virtual cClientPacket::~cClientPacket   [inline, virtual]
 


Member Function Documentation

char * cClientPacket::getBeginValidForReceive   [protected]
 

get pointer after the packet command ( it's read before )

Author:
Endymion
Since:
0.83

void cClientPacket::getFromSocket NXWSOCKET    socket,
char *    b,
int    size
[protected]
 

get From Client

Author:
Endymion
Since:
0.83a
Parameters:
socket  the socket
b  the data
size  the number of byte to read
from  offset

void cClientPacket::getStringFromSocket NXWSOCKET    socket,
string &    s,
int    length
[protected]
 

read a string from socket buffer

Author:
Endymion
Since:
0.83a
Parameters:
socket  the socket
s  the string
lenght  the length of need to read
from  offset

void cClientPacket::getUnicodeStringFromSocket NXWSOCKET    socket,
wstring &    c,
int    size = -1
[protected]
 

read an unicode string from socket buffer

Author:
Endymion
Since:
0.83a
Parameters:
s  the socket
c  the string
from  offset
size  read until NULL termination if INVALID, else read size char

void cClientPacket::receive NXWCLIENT    ps [virtual]
 

Receive packet from client.

Author:
Endymion
Since:
0.83a
Parameters:
ps  the client who send this packet
Attention:
NOT WRITE THE CMD, it's read before

Reimplemented in cPacketCreateCharacter, cPacketTalkRequest, cPacketLogin, cPacketDeleteCharacter, cPacketCharProfileReq, cPacketMenuSelection, clPacketAddPartyMember, clPacketRemovePartyMember, clPacketPartyTellMessage, clPacketPartyTellAllMessage, clPacketPartyCanLoot, clPacketPartyAccept, and clPacketPartyDecline.


The documentation for this class was generated from the following files: SourceForge.net Logo