TCP/IP just ain't fun man. Can't figure out what Im doing wrong....
Sometimes when I use Loopback as the COmputer name is goes frozen. Im using the same application to connect and host, (loaded twice obviously). It seems to work fine without error most the time but I cant seem to send and recieve. I dont even know if I am connecting to the application. Can anyone see any obvious mistakes here? These are all functions, each one for a diffrent button in the simplest of message sending applications.
mBox And Sbox are Message Box (Output) and Send Box (Message to be sent, A CSTRING type in the MFC Library).
HELLLLLLLLPPPPPPPPPP ! :-)
strMyMessage = m_sbox ;
iLen = strMyMessage.GetLength();
char *pBuf = new char;
int iBufSize = 1024;
iRcvd = m_socket.Receive(pBuf, iBufSize);
if (iRcvd == SOCKET_ERROR)
// Do some error handling here
pBuf[iRcvd] = NULL;
strRecvd = pBuf;
// Continue processing the message
m_mbox = strRecvd ;