C Board  

Go Back   C Board > General Programming Boards > Networking/Device Communication

Reply
 
LinkBack Thread Tools Display Modes
Old 08-31-2003, 01:09 AM   #1
Banned
 
zahid's Avatar
 
Join Date: Aug 2001
Posts: 532
Linux: Sample: Client - Server (Connection Error)

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
zahid is offline   Reply With Quote
Old 09-01-2003, 07:49 AM   #2
End Of Line
 
Hammer's Avatar
 
Join Date: Apr 2002
Posts: 6,240
>>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]
Hammer is offline   Reply With Quote
Old 09-07-2003, 05:40 AM   #3
Banned
 
zahid's Avatar
 
Join Date: Aug 2001
Posts: 532
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.
zahid is offline   Reply With Quote
Old 09-07-2003, 05:32 PM   #4
End Of Line
 
Hammer's Avatar
 
Join Date: Apr 2002
Posts: 6,240
>>#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]
Hammer is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Another syntax error caldeira C Programming 31 09-05-2008 01:01 AM
Why wont my function exit correctly? LightsOut06 C Programming 2 10-09-2005 09:23 PM
Stupid compiler errors ChrisEacrett C++ Programming 9 11-30-2003 05:44 PM
Couple C questions :) Divx C Programming 5 01-28-2003 01:10 AM
UNICODE and GET_STATE Registered C++ Programming 1 07-15-2002 03:23 PM


All times are GMT -6. The time now is 01:22 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22