View Single Post
Old 04-18-2006, 11:24 PM   #2 (permalink)
AssKoala
Anti-Zealot
 
AssKoala's Avatar
 
Join Date: Feb 2006
Location: Atlanta, GA
Posts: 72
AssKoala is on a distinguished road
Send a message via AIM to AssKoala Send a message via MSN to AssKoala Send a message via Yahoo to AssKoala
Are you somehow establishing a UDP connection?

You should not be receiving out of order. My webserver (had to write it for an Operating System class -- the web part was not a class aspect..) simply receives with a:

Code:
while (recv(clntSocket, buffer, RECV_SIZE, 0) > 0);
You should not be receiving out of order, or any duplicates, with TCP. However, from the sounds of it, it sounds exactly like a UDP type issue.

As for your msg, you don't need all that extra fluff if you're just testing simple stuff:

Code:
char *msg = "GET http://www.maxim-ic.com/quick_view2.cfm/qv_pk/2935 HTTP/1.1\r\nHost: www.maxim-ic.com\r\n\r\n"
Should work just fine (You only need the HTTP version, the GET, the item, and the Host).
__________________
If you always think like an expert, you'll always be a beginner. | "A handful of knowledgeable people is more effective than an army of fools" -Writing Secure Code, 2nd Ed.
AssKoala is offline   Reply With Quote