[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Can we Use fd from Socket Class
From: |
David Sugar |
Subject: |
Re: Can we Use fd from Socket Class |
Date: |
Wed, 24 Sep 2003 22:15:00 -0400 |
User-agent: |
KMail/1.5 |
I think socket is the class I least use in my own work, which is kind of
ironic; but mostly I work on telephony servers and related projects, such as
Bayonne.
I think your right that the base socket class should have a "getSocket" inline
that simply returns "so". The socket handle is in effect the same (an
integer value) on all supported platforms, so it's not like doing so will
return a different kind of object on different platforms (like happens with
low level file handles). You could also create a derived class who's sole
purpose is to provide a public method to access so or that has a "static"
select or poll structure that all instances fill. The latter offers some
potential self management of select or poll lists...
On Wednesday 24 September 2003 08:46 pm, Mike Papper wrote:
> Is it possible to use the underlying unix socket file descriptor from the
> Socket class (running under linux)?
>
> I would like to call "select" or "poll" on a set of sockets. I like the
> idea of using the Socket class but it seems to be hard to do what I want
> with the class - so I feel the need to take the fd and make system calls
> myself.