Hey,
I'm currently developing a Habbo server from zero in C++ (Console). Now, I'm using winsock.h for the socket. I created a thread (_beginthreadex) with the following code to receive the data sent by the Habbo Client:
But this doesn't output anything... It says that I'm connected in my server, but it doesn't output the data..Code:unsigned __stdcall sReceive( void* pArguments )
{
char recvBuff[] = "";
string strPacket;
memset(recvBuff, 0, sizeof(recvBuff));
int bytesRecv = 0;
bytesRecv = recv(aSocket, recvBuff, 4096, 0);
if(bytesRecv>0)
{
string strRecv = recvBuff;
string output = strRecv.substr(0, bytesRecv);
strPacket = strRecv.substr(0, 2); //Get the first two chars of strRecv
cout << output << endl;
}
return 0;
}
Anyone who can help me with this?
Thanks

