Thread: [wpdev-commits] wolfpack/python pypacket.cpp,1.11,1.12
Brought to you by:
rip,
thiagocorrea
From: Sebastian H. <dar...@us...> - 2004-07-01 14:17:14
|
Update of /cvsroot/wpdev/wolfpack/python In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1510/python Modified Files: pypacket.cpp Log Message: packet doc Index: pypacket.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/python/pypacket.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** pypacket.cpp 2 Jun 2004 19:13:14 -0000 1.11 --- pypacket.cpp 1 Jul 2004 14:17:02 -0000 1.12 *************** *** 33,37 **** #include "../network/uosocket.h" ! // Object Information struct wpPacket { --- 33,41 ---- #include "../network/uosocket.h" ! /* ! \object packet ! \description This object type represents a packet received from the client or one that should ! be sent to the client. ! */ struct wpPacket { *************** *** 69,73 **** }; ! // Resize the packet static PyObject* wpPacket_resize( PyObject* self, PyObject* args ) { --- 73,82 ---- }; ! /* ! \method packet.resize ! \param size The new size in bytes of the packet. ! \description This method resizes the packet and either truncates to the new size or ! fills newly added bytes with zeros. ! */ static PyObject* wpPacket_resize( PyObject* self, PyObject* args ) { *************** *** 83,87 **** } ! // Set a byte static PyObject* wpPacket_setbyte( PyObject* self, PyObject* args ) { --- 92,101 ---- } ! /* ! \method packet.setbyte ! \param offset The byte offset within the packet. ! \param value The integer value that should be set. ! \description This method sets a byte (8 bit) value within the packet. ! */ static PyObject* wpPacket_setbyte( PyObject* self, PyObject* args ) { *************** *** 97,101 **** } ! // Set a short static PyObject* wpPacket_setshort( PyObject* self, PyObject* args ) { --- 111,120 ---- } ! /* ! \method packet.setshort ! \param offset The byte offset within the packet. ! \param value The integer value that should be set. ! \description This method sets a short (16 bit) value within the packet. ! */ static PyObject* wpPacket_setshort( PyObject* self, PyObject* args ) { *************** *** 111,115 **** } ! // Set an integer static PyObject* wpPacket_setint( PyObject* self, PyObject* args ) { --- 130,139 ---- } ! /* ! \method packet.setint ! \param offset The byte offset within the packet. ! \param value The integer value that should be set. ! \description This method sets a integer (32 bit) value within the packet. ! */ static PyObject* wpPacket_setint( PyObject* self, PyObject* args ) { *************** *** 125,129 **** } ! // Get a byte static PyObject* wpPacket_getbyte( PyObject* self, PyObject* args ) { --- 149,158 ---- } ! /* ! \method packet.getbyte ! \param offset The byte offset within the packet. ! \return An integer value. ! \description This methods get an 8-bit value from the packet. ! */ static PyObject* wpPacket_getbyte( PyObject* self, PyObject* args ) { *************** *** 136,140 **** } ! // Get a short static PyObject* wpPacket_getshort( PyObject* self, PyObject* args ) { --- 165,174 ---- } ! /* ! \method packet.getshort ! \param offset The byte offset within the packet. ! \return An integer value. ! \description This methods get a 16-bit value from the packet. ! */ static PyObject* wpPacket_getshort( PyObject* self, PyObject* args ) { *************** *** 147,151 **** } ! // Get an integer static PyObject* wpPacket_getint( PyObject* self, PyObject* args ) { --- 181,190 ---- } ! /* ! \method packet.getint ! \param offset The byte offset within the packet. ! \return An integer value. ! \description This methods get a 32-bit value from the packet. ! */ static PyObject* wpPacket_getint( PyObject* self, PyObject* args ) { *************** *** 158,163 **** } ! ! // Set raw data in the packet buffer static PyObject* wpPacket_setascii( PyObject* self, PyObject* args ) { --- 197,206 ---- } ! /* ! \method packet.setascii ! \param offset The byte offset within the packet. ! \param value The string value. ! \description This method copies an ASCII string into the packet including the null termination byte. ! */ static PyObject* wpPacket_setascii( PyObject* self, PyObject* args ) { *************** *** 185,189 **** } ! // Set data in unicode encoding static PyObject* wpPacket_setunicode( PyObject* self, PyObject* args ) { --- 228,237 ---- } ! /* ! \method packet.setunicode ! \param offset The byte offset within the packet. ! \param value The unicode or utf-8 value. ! \description This method copies an unicode string into the packet including the null termination byte. ! */ static PyObject* wpPacket_setunicode( PyObject* self, PyObject* args ) { *************** *** 204,207 **** --- 252,261 ---- } + /* + \method packet.getunicode + \param offset The byte offset within the packet. + \param length The maximum length. + \description This method gets an unicode string from the packet. + */ static PyObject* wpPacket_getunicode( PyObject* self, PyObject* args ) { *************** *** 220,223 **** --- 274,283 ---- } + /* + \method packet.getascii + \param offset The byte offset within the packet. + \param length The maximum length. + \description This method gets an ASCII string from the packet. + */ static PyObject* wpPacket_getascii( PyObject* self, PyObject* args ) { *************** *** 243,247 **** } ! // Send the packet static PyObject* wpPacket_send( PyObject* self, PyObject* args ) { --- 303,311 ---- } ! /* ! \method packet.send ! \param socket A <object id="socket">socket</object> object. ! \description This method sends this packet to a given socket. ! */ static PyObject* wpPacket_send( PyObject* self, PyObject* args ) { *************** *** 257,261 **** } ! // Return a Packet Dump static PyObject* wpPacket_dump( PyObject* self, PyObject* args ) { --- 321,329 ---- } ! /* ! \method packet.dump ! \return A string. ! \description This method creates a dump of the packet and returns it as a human readable string. ! */ static PyObject* wpPacket_dump( PyObject* self, PyObject* args ) { *************** *** 287,290 **** --- 355,361 ---- static PyObject* wpPacket_getattr( PyObject* self, char* name ) { + /* + \rproperty packet.size The current size of this packet. + */ if ( !strcmp( name, "size" ) ) { |