Re: [Flightgear-devel] read not excepting more than one client

2003-12-01 Thread Seamus Thomas Carroll
@[EMAIL PROTECTED] (Swearing),

Do you know of any websites that I can read the will improve my 
understaning of sockets?  At my current level of understanding I am having 
trouble making sense of the pegasus network library and how it is being 
used in httpd.cxx and props.cxx due to the little documentation on the 
plib website.

Can someone explain why SGSocket restricts the number of clients to one? 
Would it not make more sense to allow up to some maximum number of 
clients?

Seamus

On Sun, 30 Nov 2003, Bernie Bright wrote:

 On Fri, 28 Nov 2003 22:45:24 -0700
 Seamus Thomas Carroll [EMAIL PROTECTED] wrote:
 
  Hi,
  
  I have created  a server which has one SGSocket object listening for
  clients that want to connect.  The problem I am having is when a second
  client sends its connect info to the server the server never gets the
  message.  Note that the server is listening using readline and that the
  connection is tcp.  I have tried two different clients and they both work
  if they are the first one to connect.
  
  Are there any restrictions on a SG_IO_IN socket that I should be aware
  of?  Any other suggestions?
  
  This problem could be with my code but I want to ask the
  question before I spend a lot of time on looking for the problem.
 
 What you are seeing is normal behaviour for SGSocket.  You might be better
 served by using plib.net.  This is what FlightGear uses for the http and prop
 servers.  See src/Network/httpd.cxx and src/Network/props.cxx for examples.
 
 Bernie
 
 ___
 Flightgear-devel mailing list
 [EMAIL PROTECTED]
 http://mail.flightgear.org/mailman/listinfo/flightgear-devel
 


___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel


Re: [Flightgear-devel] read not excepting more than one client

2003-12-01 Thread Paul Surgeon
On Monday, 1 December 2003 23:59, Seamus Thomas Carroll wrote:
 @[EMAIL PROTECTED] (Swearing),

 Do you know of any websites that I can read the will improve my
 understaning of sockets?  At my current level of understanding I am having
 trouble making sense of the pegasus network library and how it is being
 used in httpd.cxx and props.cxx due to the little documentation on the
 plib website.

 Can someone explain why SGSocket restricts the number of clients to one?
 Would it not make more sense to allow up to some maximum number of
 clients?

 Seamus

Here's a good place to start if you want to know how *nix sockets work.
http://docs.sun.com/db/doc/802-5886/6i9k5sgsk?a=view

All the other libraries you see are just wrappers around the basic socket 
routines.

I'm not sure what the pegasus network library supports but if you want to 
allow multiple connections on vanilla *nix sockets you can use one of the 
following approaches :
- select (easy approach)
- multithreading (dangerous/tricky approach - mutexes, semaphores, race 
conditions, deadlock conditions ...)

Paul


___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel


Re: [Flightgear-devel] read not excepting more than one client

2003-11-29 Thread Bernie Bright
On Fri, 28 Nov 2003 22:45:24 -0700
Seamus Thomas Carroll [EMAIL PROTECTED] wrote:

 Hi,
 
 I have created  a server which has one SGSocket object listening for
 clients that want to connect.  The problem I am having is when a second
 client sends its connect info to the server the server never gets the
 message.  Note that the server is listening using readline and that the
 connection is tcp.  I have tried two different clients and they both work
 if they are the first one to connect.
 
 Are there any restrictions on a SG_IO_IN socket that I should be aware
 of?  Any other suggestions?
 
 This problem could be with my code but I want to ask the
 question before I spend a lot of time on looking for the problem.

What you are seeing is normal behaviour for SGSocket.  You might be better
served by using plib.net.  This is what FlightGear uses for the http and prop
servers.  See src/Network/httpd.cxx and src/Network/props.cxx for examples.

Bernie

___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel


[Flightgear-devel] read not excepting more than one client

2003-11-28 Thread Seamus Thomas Carroll
Hi,

I have created  a server which has one SGSocket object listening for
clients that want to connect.  The problem I am having is when a second
client sends its connect info to the server the server never gets the
message.  Note that the server is listening using readline and that the
connection is tcp.  I have tried two different clients and they both work
if they are the first one to connect.

Are there any restrictions on a SG_IO_IN socket that I should be aware
of?  Any other suggestions?

This problem could be with my code but I want to ask the
question before I spend a lot of time on looking for the problem.
Thanks-you,

Seamus

___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel