From b7d524423c23470cd11e720eeb48368c072838cb Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Tue, 7 Feb 2012 20:49:52 +0000 Subject: Rewritten all packets to use buffers instead of direct sockets, for future cSocketThreads compatibility. Moved data sending from cPacket into cSocket git-svn-id: http://mc-server.googlecode.com/svn/trunk@240 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/cSocket.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source/cSocket.h') diff --git a/source/cSocket.h b/source/cSocket.h index 8098714c4..7075adab5 100644 --- a/source/cSocket.h +++ b/source/cSocket.h @@ -4,6 +4,12 @@ +class cPacket; + + + + + class cSocket { public: @@ -63,6 +69,8 @@ public: int Connect(SockAddr_In & a_Address); // Returns 0 on success, !0 on failure int Receive( char* a_Buffer, unsigned int a_Length, unsigned int a_Flags ); int Send (const char * a_Buffer, unsigned int a_Length); + int Send (const cPacket * a_Packet); // Sends the packet, doesn't handle partial sends + int Send (const cPacket & a_Packet); // Sends the packet, doesn't handle partial sends unsigned short GetPort(void) const; // Returns 0 on failure -- cgit v1.2.3