Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 09-22-2005, 05:57 AM   #1
Registered: Sep 2005
Posts: 41

Rep: Reputation: 15
Socket connection refused problem

I ran a very simple client, server program and it works fine with my own ip address but my connection gets timed out or refused for every other ip address outside my own computer. I am not using the fork command...should i?. All i want to do is to run a client program on one pc and server on another........send a message and get a response from the other pc. This should be easy enough but i don't know how to do it
Old 09-23-2005, 05:51 PM   #2
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,575

Rep: Reputation: 181Reputation: 181
I understand it timeouts or gets refused when you have one conection establilished? If that's the case, you need to make your server support more than one connection at once. Forking isn't a good idea, but threads or use of select() function is. For first time, select() is probably easier. Man page has a short example (not using sockets, but it's the same).


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Socket Connection Failed: 111 Connection Refused degraffenried13 Linux - General 3 05-31-2009 02:17 AM
Socket Application: Connection refused Agent007 Linux - Networking 1 01-27-2004 01:48 AM
Connection Refused Problem sangjin Linux - Newbie 1 12-30-2003 07:43 AM
connection refused problem herambshembekar Linux - Networking 2 04-08-2002 08:48 AM
connection refused problem. jdevanand Linux - Networking 4 03-04-2002 08:30 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:00 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration