summaryrefslogtreecommitdiff
path: root/src/common/socket.h
diff options
context:
space:
mode:
authorFlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-12-02 04:21:35 +0000
committerFlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-12-02 04:21:35 +0000
commit0698f0b34299624e6ac535442b4e7b8894dd8167 (patch)
treee99840f5ad111c4fb7828f1f0d054e157a315e03 /src/common/socket.h
parent5a6cc045a38a775943b29ca5903520c96935f2d1 (diff)
downloadhercules-0698f0b34299624e6ac535442b4e7b8894dd8167.tar.gz
hercules-0698f0b34299624e6ac535442b4e7b8894dd8167.tar.bz2
hercules-0698f0b34299624e6ac535442b4e7b8894dd8167.tar.xz
hercules-0698f0b34299624e6ac535442b4e7b8894dd8167.zip
- Replaced @send with the version I use for testing packets.
Can display the packet length. Supports dynamic packets, quoted strings with escaped characters and fixed/variable length, and normal/hex byte/word/long data types. The number of fields is not limited, but it automatically stops parsing when the packet is full. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9387 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/common/socket.h')
-rw-r--r--src/common/socket.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/common/socket.h b/src/common/socket.h
index eb3a78f7e..9552575f3 100644
--- a/src/common/socket.h
+++ b/src/common/socket.h
@@ -72,6 +72,10 @@ extern time_t stall_time;
#define WBUFW(p,pos) (*(unsigned short*)((p) + (pos)))
#define WBUFL(p,pos) (*(unsigned long*)((p) + (pos)))
+#define TOB(n) ((unsigned char)(n))
+#define TOW(n) ((unsigned short)(n))
+#define TOL(n) ((unsigned long)(n))
+
//FD_SETSIZE must be modified on the project files/Makefile, since a change here won't affect
// dependant windows libraries.
/*