Fixed a really nasty receive bug (TCP only). Using SCTP would be so much better...

This commit is contained in:
lotodore
2007-09-03 16:35:45 +00:00
parent 9fcd33d229
commit ecab6ed86b
9 changed files with 132 additions and 80 deletions
+5 -1
View File
@@ -22,7 +22,7 @@
#define _CLIENTCONTEXT_H_
#include <net/netcontext.h>
#include <net/receivebuffer.h>
class ClientContext : public NetContext
{
@@ -67,6 +67,9 @@ public:
int GetClientSockaddrSize() const
{return m_addrFamily == AF_INET6 ? sizeof(sockaddr_in6) : sizeof(sockaddr_in);}
ReceiveBuffer &GetReceiveBuffer()
{return m_receiveBuffer;}
private:
SOCKET m_sockfd;
int m_protocol;
@@ -76,6 +79,7 @@ private:
std::string m_password;
sockaddr_storage m_clientSockaddr;
std::string m_playerName;
ReceiveBuffer m_receiveBuffer;
};
#endif