[openbeosnetteam] Re: Select code...
- From: "David Reid" <dreid@xxxxxxxxxxxx>
- To: <openbeosnetteam@xxxxxxxxxxxxx>
- Date: Mon, 25 Mar 2002 11:29:01 -0000
In fact this is the code...
static status_t net_socket_select(void *cookie,
uint8 event,
uint32 ref,
selectsync *sync)
{
dprintf("net_socket_select!\n");
dprintf("\tevent = %d\n", event);
dprintf("\tref = %d\n", ref);;
dprintf("\tsync = %p\n", sync);
return B_OK;
}
static status_t net_socket_deselect(void *cookie,
uint8 event,
selectsync *sync)
{
dprintf("net_socket_select!\n");
dprintf("event = %d\n", event);
dprintf("sync = %p\n", sync);
return B_OK;
}
device_hooks openbeos_net_server_hooks =
{
net_socket_open,
net_socket_close,
net_socket_free,
net_socket_control,
net_socket_read,
net_socket_write,
net_socket_select,
net_socket_deselect,
NULL, /* Don't implement the scattered buffer read and write. */
NULL
};
david
----- Original Message -----
From: "Philippe Houdoin" <philippe.houdoin@xxxxxxx>
To: <openbeosnetteam@xxxxxxxxxxxxx>
Sent: Monday, March 25, 2002 7:48 AM
Subject: [openbeosnetteam] Re: Select code...
> David wrote:
> > This is the code I'm using and it doesn't work!
>
> [...]
>
> Your code doesn't show the select and deselect() hooks of the /dev/net/
> socket driver..
> AFAIR, there aren't implemented (yet!?). that should be implemented:
> the kernel select()
> call these on each file descriptor(s) to monitor.
> If the select() hook of the driver return a error, the full select()
> will fail, I guess.
>
> > Perhaps I need to copy the contents?
>
> No need to: kernel select() call is a blocking one, and can access the
> userspace
> supplied FD_SET bits all time long.
>
> Oh, by the way, I'm back from snowboarding trip, should be able to
> help a *little* more than previous week ;-)
>
> -Philippe
>
> --
> Fortune Cookie Says:
>
> "My life is a soap opera, but who has the rights?"
> -- MadameX
>
>
>
- References:
- [openbeosnetteam] Re: Select code...
- From: Philippe Houdoin
Other related posts:
- » [openbeosnetteam] Select code...
- » [openbeosnetteam] Re: Select code...
- » [openbeosnetteam] Re: Select code...
- » [openbeosnetteam] Re: Select code...
- » [openbeosnetteam] Re: Select code...
- » [openbeosnetteam] Re: Select code...
- » [openbeosnetteam] Re: Select code...
- » [openbeosnetteam] Re: Select code...
- » [openbeosnetteam] Re: Select code...
- » [openbeosnetteam] Re: Select code...
- » [openbeosnetteam] Select code...
- [openbeosnetteam] Re: Select code...
- From: Philippe Houdoin