• Advertisement
Sign in to follow this  

Fatal exception while receiving data from winsock

This topic is 4858 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Ive been making an HTTP winsock wrapper and its all working great except for when i recv the data. I have narrowed down the problem to here:
	char buffer[100];
	*data = "";
	err = 100;
	while (err == 100)
		strset(buffer, ' ');
		err = recv(theSocket, buffer, sizeof(buffer), 0);

		cout << err << "\n";

		*data += buffer;

data is a string. The fatal exception seems to occur after its done receiving (when err != 100) This is my first time using winsock and im sure there are better ways to receive so if you have any suggestions id be glad to hear them. :) EDIT: Also, the socket is connected and a GET request was successfully sent. The data being returned is also correct (from what i saw in my packet sniffer) [Edited by - MitchellH on November 27, 2004 12:38:43 PM]

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement