Fixed a really nasty receive bug (TCP only). Using SCTP would be so much better...
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
#define _SESSIONDATA_H_
|
||||
|
||||
#include <net/socket_helper.h>
|
||||
#include <net/receivebuffer.h>
|
||||
#include <string>
|
||||
|
||||
#define SESSION_ID_INIT 0
|
||||
@@ -49,11 +50,15 @@ public:
|
||||
void SetClientAddr(const std::string &addr)
|
||||
{m_clientAddr = addr;}
|
||||
|
||||
ReceiveBuffer &GetReceiveBuffer()
|
||||
{return m_receiveBuffer;}
|
||||
|
||||
private:
|
||||
SOCKET m_sockfd;
|
||||
unsigned m_id;
|
||||
State m_state;
|
||||
std::string m_clientAddr;
|
||||
ReceiveBuffer m_receiveBuffer;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user