Results 1 to 6 of 6
hi,
I am trying to write the socket programming in unix.first i checked the socket programming like AF_UNIX family and type is SOCK_STREAM in the socket() function which means a ...
- 03-12-2008 #1Just Joined!
- Join Date
- Feb 2008
- Posts
- 45
socket no route to host
hi,
I am trying to write the socket programming in unix.first i checked the socket programming like AF_UNIX family and type is SOCK_STREAM in the socket() function which means a socket is created in the path.
Then i tried to write by using AF_INET and type is SOCK_STREAM in the socket() which is connected to LAN, where i run the server prog in my computer and try to run the client prog in the other but i got an error in the connet() like "NO ROUTE TO HOST". I have used the port 5990 which are available for users.
I checked both the program by runnig in my system giving a loopback address in the client IP address it is working fine.
I dont know where i have gone wrong.
PLz help me out
Thanks,
vinayak
- 03-12-2008 #2
On the system where you're doing the connect(), what happens when you ping the system to which you're trying to connect?
--
Bill
Old age and treachery will overcome youth and skill.
- 03-13-2008 #3Just Joined!
- Join Date
- Feb 2008
- Posts
- 45
socket no route to host
hi,
When I ping from the client system for the server IP, it is working.
I don't no whats wrong.
can u plz guide me step by step.
Thanks,
- 03-14-2008 #4
Network programming isn't rocket science, but it does involve lots of details. I can't really guide you step by step through the whole thing, because my time is limited. Sorry about that.
But do check out the excellent Addison Wesley book UNIX Network Programming, volume one, by W. Richard Stevens of happy memory.
You'll learn the answers to many important questions you would never have thought to ask.
Good luck!--
Bill
Old age and treachery will overcome youth and skill.
- 04-08-2011 #5Just Joined!
- Join Date
- Aug 2009
- Posts
- 6
ya, ping works.
Ping works. but socket's connect( ) fails.
I also face the same problem. Tell me the solution.
- 04-08-2011 #6forum.guy
- Join Date
- May 2004
- Location
- arch linux
- Posts
- 18,096
Hello, najoshi

Please start a new thread of your own if you are having problems with Linux. This thread is over 3 years old, so locking it down.
Thank you.oz
→ new members/users: read this first | new member faq
→ no private messages requesting computer support - post them on the forums!
→ please use the "report post" button to alert our forum admins to problematic posts rather than responding to them yourself.


