|
-
March 9th, 2000, 04:56 PM
#1
winsock send
hi, i have been making a program to accept multiple connections. i have succeeded in doing this but i have ran across a problem. when you have the winsock sends two or more lines of data without a pause in between the client user receives them in one big packet or not at all i dont like to use the pause because this type of application will be to slow to use! any ideas on how to fix this? thanks
-
March 9th, 2000, 05:00 PM
#2
Re: winsock send
You should device your own little protocol for this.
The simplest scheme will be to always send an integer first that holds the length of the string that follows.
Clients should receive the integer first and then read the exact number of bytes from the socket to get the packet.
Kailash
-
March 9th, 2000, 05:22 PM
#3
Re: winsock send
yea but since the packets seem to go into one packet then it will only read the first part and the rest is lost!??
-
March 9th, 2000, 06:56 PM
#4
Re: winsock send
The client should keep trying to read data until something else tells it to stop / terminate.
Kailash
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|