-
August 22nd, 2006, 06:35 AM
#1
TCP receive question
Hi!
In my application a use a serial interface for communication. This interface allows sending bytes and (NECCESSARY) calls a function as soon as an event happend on the line.
So receiving is easy: as soon at least character has arrived, th function gets called and I can process the data.
Now I want to archieve the same for TCP-connection. But until now I could'nt find such a called function. I would have to call recv() in a loop and analyze after that the result.
Is there any way to make the workflow as it is with the serial intrerface?
Thanks!
Marc
-
August 22nd, 2006, 06:57 AM
#2
Re: TCP receive question
Originally Posted by Marc from D
Now I want to archieve the same for TCP-connection. But until now I could'nt find such a called function. I would have to call recv() in a loop and analyze after that the result.
recv() functions gets data in a char buffer. So the ideea of calling it in a loop and it's analysis afther that it's the only way to find the results.
I guess that this it's the only ideea, cause TCP is not a serial (it's not a bit by bit... communication protocol), so this function and the TCP protocol should not offer you the possibility to test a bit in the receiving moment.
Last edited by Maximus_X; August 22nd, 2006 at 07:01 AM.
-
August 22nd, 2006, 07:02 AM
#3
Re: TCP receive question
you can implement it in the same way using WaitForSingleObject
- Sreehari
"Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us."
" Everybody is sent to Earth on a purpose. I am so Lagging behind that i won't die." – Calvin
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
|