Jump to content
  • Advertisement
Sign in to follow this  
MitchellH

Fatal exception while receiving data from winsock

This topic is 5048 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
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!