What is getting written to the socket when I write an ENUM reference (below)? I have something captured in whireshark but it does not resemble the ENUM name “JOIN” .. it is not the same length either. The server somehow understands that this code sent the JOIN enum.
#include <sstream>
#include <iostream>
... WriteToSocket( SOCKET hSocket, char *buf, int iCount)
send(hSocket, buf, iCount, 0);
enum { JOIN, ...};
m_Command = JOIN;
WriteToSocket (hSocket, (char *)&m_Command, sizeof(m_Command));
I hope I included enough info and include statements …
An integral value is begin written. The size of the varaible can vary. In your case the size might be anything between either a 1-byte zero, up to an
int-sized zero.To see exactly what is being written, add this code: