Nemoticchigga 0 Junior Poster in Training

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.