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

/home/groups/n/no/noxwizard/cvs/src/packets.cpp File Reference

#include "nxwcommn.h"
#include "packets.h"
#include "network.h"
#include "globals.h"
#include "chars.h"
#include "party.h"

Functions

void reciveFromSocket (NXWSOCKET socket, char *b, int size, int &from)
 get From Client

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

void reciveUnicodeStringFromSocket (NXWSOCKET s, wstring &c, int &from, int size)
 read an unicode string from socket buffer


Variables

wstring emptyUnicodeString
char stringTerminator = 0x00
char unicodeStringTerminator [2] = { 0x00, 0x00 }

Define Documentation

#define CREATE NAME,
CMD,
SIZE   
 

Value:

cPacket##NAME::cPacket##NAME() { \
        cmd = CMD; \
        headerSize = SIZE; \
};
packet macro

Author:
Endymion
Since:
0.83a

#define RECEIVE NAME       void cPacket##NAME::receive( NXWCLIENT ps )
 

#define SEND NAME       void cPacket##NAME::send( NXWCLIENT ps )
 

#define SENDC NAME       void cPacket##NAME::send( P_CHAR pc )
 


Function Documentation

void reciveFromSocket NXWSOCKET    socket,
char *    b,
int    size,
int &    from
[inline]
 

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 reciveStringFromSocket NXWSOCKET    socket,
string &    s,
int    lenght,
int &    from
[inline]
 

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 reciveUnicodeStringFromSocket NXWSOCKET    s,
wstring &    c,
int &    from,
int    size
[inline]
 

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


Variable Documentation

wstring emptyUnicodeString
 

char stringTerminator = 0x00
 

char unicodeStringTerminator[2] = { 0x00, 0x00 }
 

SourceForge.net Logo