On Mon, 01 Dec 2003 14:59:39 -0700
Seamus Thomas Carroll <[EMAIL PROTECTED]> 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.

plib.net is based on the python medusa project,
http://www.nightmare.com/medusa/medusa.html.  Other than the source I'm not
aware of any other documentation.  There are lots of good books on socket
programming, anything by the late W Richard Stevens is highly recommended. 
Also try googling for online tutorials.

> Can someone explain why SGSocket restricts the number of clients to one? 

Historical?  Because one client is easy, more than one is hard? :)

> Would it not make more sense to allow up to some maximum number of 
> clients?

Probably, but we'd just end up duplicating what is already handled by
plib.net.  I still think plib.net is your best option rather than banging your
head against SGSocket's limitations.

Bernie

 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.

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

Reply via email to