[prev in list] [next in list] [prev in thread] [next in thread] 

List:       opensolaris-edu-discuss
Subject:    Re: [edu-discuss] Any alternative path of sotpi_recvmsg,	for UDP
From:       Kacheong Poon <kacheong.poon () sun ! com>
Date:       2007-05-16 8:45:40
Message-ID: 464AC4B4.2020601 () sun ! com
[Download RAW message or body]

×޼Πwrote:

> Our question is: Is there an alternative path for "recvfrom" which is more simple \
> than the current sotpi_recvmsg imeplementation, and will not lock  during copying \
> data from kernel to user space ?


I think the usual method in this scenario is just use select() on the
socket.  When there is something to be read, select() returns and
your app can decide which one of those processes should handle this
packet and then dispatch that packet to that process.  And if all
the processes are actually doing the same thing, you may also consider
using threads instead.  It is much more light weight.

You may also consider using event ports.  See port_create(3C),
port_associate(3C) and port_get(3C).  See also the following article
for more info

http://developers.sun.com/solaris/articles/event_completion.html



-- 

						K. Poon.
						kacheong.poon@sun.com

_______________________________________________
edu-discuss mailing list
edu-discuss@opensolaris.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic