DragonFly kernel List (threaded) for 2008-08
DragonFly BSD
DragonFly kernel List (threaded) for 2008-08
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: [netmp] socket accesses


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Sun, 17 Aug 2008 15:31:41 -0700 (PDT)

:What do you picture the protocol side doing in response to this message?
:Currently, the process side will be woken up when e.g. new data arrives or
:the connection state changes etc. But to decide if anything changed since
:the message was sent, the protocol essentially needs to know what the process
:side "knew" when it sent the message. So we need to send a message which
:includes a pointer to, say:
:
:struct socksnap {
:	int state;
:	int rcvdata;
:};
:
:Is that what you had in mind?
:
:Aggelos

    I think almost all such messages could simply use a specific callback
    that checks for a specific set of conditions.  For example, if the
    reader blocks it is simply waiting for an unblocking condition such
    as data present in the sockbuf or an EOF/disconnect condition.

    The most complex case might be something used by the atomic record
    code or the HTTP filter code, where data is present in the sockbuf but
    the reader wants to wait for more.  In that case a single field could
    be supplied, aka the disred wbytes target.

					-Matt
					Matthew Dillon 
					<dillon@backplane.com>



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]