I am using the winsock component in vs2005. I have tried sending and recieving strings. The event of data arriving triggers and runs the following code...
private: System::Void WinSockControl_DataArrival(System::Object^ sender, AxMSWinsockLib::DMSWinsockControlEvents_DataArrivalEvent^ e) {
System::String^ messageBuf = "";
this->WinSockControl->GetData(messageBuf);
int i = this->WinSockControl->BytesReceived;
}
This gets run so the data is arriving, but messageBuf is never filled and when i look at the BytesReceived, it is 0. I KNOW (100%) my send works, so I am stumped. Does anyone know why this may be happening? Thanks.