LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-22-2005, 05:57 AM   #1
James_dean
Member
 
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
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
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).
 
  


Reply


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

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:25 AM.

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