Client/Server Socket Receive Problem
Im trying to send an array from the server application to the client on the same machine. The array is loaded and Sent from the server and recieved at the client but the array seems to be empty on the client side. I am using the socket.Receive function on the client side. I can send string messages back and forth without any problems. I am using Visual C++ MFC IDE tool to generate program.
//This is the server side declaration and Socket Send. I know that on the array has data in it on the server side
iSent = m_sConnectSocket.Send(Acountries,NULL,NULL);
//This is the client side declaration an Socket Receive
iRcvd = m_sConnectSocket.Receive(Acountries,NULL,NULL);
//Receive the message ** This is what I use to get the string
// messages that work correctly for both client and server
char *pBuf = new char;
int iBufSize = 1024;
iRcvd = m_sConnectSocket.Receive(pBuf, iBufSize);
Any and all comments greatly appreciated.