Hi,
I was also working to create a Client Server Application. But I'm getting connection error after sometimes. (No regularity)
Here is the sample code from TCP/IP V-3 by R.Stevens
Hi,
I was also working to create a Client Server Application. But I'm getting connection error after sometimes. (No regularity)
Here is the sample code from TCP/IP V-3 by R.Stevens
[ Never code before desk work ]
-------------------------------------:-->
A man who fears Nothing is the man who Loves Nothing
If you Love Nothing, what joy is there in your life.
=------------------------------------------------------= - I may be wrong.
>>But I'm getting connection error after sometimes
Can you be more specific? Post your troublesome code here rather than linking to code from a book.
When all else fails, read the instructions.
If you're posting code, use code tags: [code] /* insert code here */ [/code]
Okay .. at least a response from one. Thank you for that.
That's modified code which I'm working with.
I was testing what happen when client is trying to send data and server is not running.
In that situation, when I start the server, some times it works(receive data), some times not.
Note: Original code does not contain
#define MSG_EOF 0x100 but used. Is there any problem with that?
Last edited by zahid; 09-07-2003 at 05:43 AM.
[ Never code before desk work ]
-------------------------------------:-->
A man who fears Nothing is the man who Loves Nothing
If you Love Nothing, what joy is there in your life.
=------------------------------------------------------= - I may be wrong.
>>#define MSG_EOF 0x100 but used. Is there any problem with that?
It depends what you're doing with it. Where are you using it in the code?
Anyway, if you're putting it in the data as a trailing byte to denote EOF, it won't work as it is > 255, and therefore won't fit in one byte.
When all else fails, read the instructions.
If you're posting code, use code tags: [code] /* insert code here */ [/code]