|
HI
No its up to you. You will have to decide
what will be in your packet.
something like
size
// sizeof whole packet
command/request
// waht this packet contains
other stuff
// any stuff
needed
DataBlock //
block of data in packet
Max
----- Original Message -----
Sent: Sunday, December 05, 2004 10:50
AM
Subject: Re: [msvc] IO Completion
Port
Hi max,
Thanks for the below.
So when a client does a WSASend(..) , does the
WSASend(..) functuion add the size of packet before it sends the
data?
Neil
----- Original Message -----
Sent: Sunday, December 05, 2004 10:22
AM
Subject: Re: [msvc] IO Completion
Port
HI
Hi,
I am about to write server code
for a GPRS connection. I was wondering when does the IO Completion port
worker thread get the information? For example, if the server sends out a
request to the GPRS system to send 50 bytes (which it does), how does the
IO Completion port knows how much data to read before informing a worker
thread?.
As far as I understand what you are asking, the
IOCP calls the CALLBACK function when it has some data to read in.
This data may (mostly likely) will not be the whole packet of
information. Its up to you to place a number as the first part of the
packet to tell the receiving prog how big the packet is. It is then up
to your program to keep reading the data from the port until it has a whole
packet with which it can do something.
Does the IO Completion port call a
working thread when there is a timeout after the first character is read
(and if the buffer is full)? As the worker thread doesn't get called when
each byte is received.
I didn't think IOCP did timeouts.
Max
_______________________________________________ msvc mailing
list [EMAIL PROTECTED] See
http://beginthread.com/mailman/listinfo/msvc_beginthread.com for
subscription changes, and list archive.
_______________________________________________ msvc mailing
list [EMAIL PROTECTED] See
http://beginthread.com/mailman/listinfo/msvc_beginthread.com for subscription
changes, and list archive.
|
_______________________________________________
msvc mailing list
[EMAIL PROTECTED]
See http://beginthread.com/mailman/listinfo/msvc_beginthread.com for
subscription changes, and list archive.