Common Lisp Package: IOLIB.MULTIPLEX

README:

FUNCTION

Public

FD-READY-P (FD &OPTIONAL (EVENT-TYPE INPUT))

Tests file-descriptor `FD' for I/O readiness. `EVENT-TYPE' must be either :INPUT, :OUTPUT or :IO .

WAIT-UNTIL-FD-READY (FILE-DESCRIPTOR EVENT-TYPE &OPTIONAL TIMEOUT ERRORP)

Poll file descriptor `FILE-DESCRIPTOR' for I/O readiness. `EVENT-TYPE' must be either :INPUT, :OUTPUT or :IO. `TIMEOUT' must be either a non-negative integer measured in seconds, or `NIL' meaning no timeout at all. If `ERRORP' is not NIL and a timeout occurs, then a condition of type `POLL-TIMEOUT' is signaled. Returns two boolean values indicating readability and writeability of `FILE-DESCRIPTOR'.

Undocumented

FD-READABLEP (FD)

FD-WRITABLEP (FD)

Private

%PQUEUE-CONTENTS (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

%PQUEUE-KEYFUN (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

%TIMER-EXPIRE-TIME (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

%TIMER-FUNCTION (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

%TIMER-NAME (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

%TIMER-ONE-SHOT (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

%TIMER-RELATIVE-TIME (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

FD-ENTRY-ERROR-CALLBACK (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

FD-ENTRY-FD (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

FD-ENTRY-READ-HANDLER (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

FD-ENTRY-WRITE-HANDLER (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

FD-HANDLER-CALLBACK (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

FD-HANDLER-FD (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

FD-HANDLER-ONE-SHOT-P (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

FD-HANDLER-TIMER (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

FD-HANDLER-TYPE (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

GET-FD-LIMIT

Return the maximum number of FDs available for the current process.

PRIORITY-QUEUE-EXTRACT-MINIMUM (PRIORITY-QUEUE)

Remove and return the item in PRIORITY-QUEUE with the largest key.

PRIORITY-QUEUE-INSERT (PRIORITY-QUEUE NEW-ITEM)

Add NEW-ITEM to PRIORITY-QUEUE.

PRIORITY-QUEUE-MINIMUM (PRIORITY-QUEUE)

Return the item in PRIORITY-QUEUE with the largest key.

PRIORITY-QUEUE-REMOVE (PRIORITY-QUEUE ITEM &KEY (TEST #'EQ))

Remove and return ITEM from PRIORITY-QUEUE.

Undocumented

%DISPATCH-EVENT (FD-ENTRY EVENT-TYPE ERRORP NOW)

%HANDLE-ONE-FD (EVENT-BASE EVENT NOW DELETION-LIST)

%MAKE-PRIORITY-QUEUE (&KEY ((CONTENTS DUM236) NIL) ((KEYFUN DUM237) NIL))

%MAKE-TIMER (NAME FUNCTION EXPIRE-TIME RELATIVE-TIME ONE-SHOT)

SETF%PQUEUE-CONTENTS (NEW-VALUE INSTANCE)

SETF%PQUEUE-KEYFUN (NEW-VALUE INSTANCE)

%REMOVE-FD-ENTRY (EVENT-BASE FD)

%REMOVE-FD-HANDLERS (EVENT-BASE FD ENTRY READ WRITE ERROR)

%REMOVE-HANDLERS (EVENT-BASE EVENT-LIST)

%REMOVE-IO-HANDLER (EVENT-BASE FD FD-ENTRY EVENT)

%SET-IO-HANDLER (EVENT-BASE FD EVENT FD-ENTRY TIMEOUT)

%SET-IO-HANDLER-TIMER (EVENT-BASE EVENT TIMEOUT)

SETF%TIMER-EXPIRE-TIME (NEW-VALUE INSTANCE)

SETF%TIMER-FUNCTION (NEW-VALUE INSTANCE)

SETF%TIMER-NAME (NEW-VALUE INSTANCE)

SETF%TIMER-ONE-SHOT (NEW-VALUE INSTANCE)

SETF%TIMER-RELATIVE-TIME (NEW-VALUE INSTANCE)

ALLOCATE-FD-SET

CALC-EPOLL-FLAGS (FD-ENTRY)

COMPUTE-POLL-FLAGS (TYPE)

COPY-PRIORITY-QUEUE (INSTANCE)

COPY-TIMER (INSTANCE)

DISPATCH-FD-EVENTS-ONCE (EVENT-BASE TIMEOUT NOW)

DISPATCH-FD-TIMEOUTS (EVENTS)

DISPATCH-TIMER (TIMER)

EXPIRE-EVENT (EVENT-BASE EVENT)

EXPIRE-PENDING-TIMERS (SCHEDULE NOW)

FD-ENTRY-EMPTY-P (FD-ENTRY)

SETFFD-ENTRY-ERROR-CALLBACK (NEW-VALUE INSTANCE)

SETFFD-ENTRY-FD (NEW-VALUE INSTANCE)

FD-ENTRY-HANDLER (FD-ENTRY EVENT-TYPE)

SETFFD-ENTRY-HANDLER (EVENT FD-ENTRY EVENT-TYPE)

FD-ENTRY-OF (EVENT-BASE FD)

SETFFD-ENTRY-OF (FD-ENTRY EVENT-BASE FD)

FD-ENTRY-P (OBJECT)

SETFFD-ENTRY-READ-HANDLER (NEW-VALUE INSTANCE)

SETFFD-ENTRY-WRITE-HANDLER (NEW-VALUE INSTANCE)

FD-ERROR-P (FD)

SETFFD-HANDLER-CALLBACK (NEW-VALUE INSTANCE)

SETFFD-HANDLER-FD (NEW-VALUE INSTANCE)

SETFFD-HANDLER-ONE-SHOT-P (NEW-VALUE INSTANCE)

FD-HANDLER-P (OBJECT)

SETFFD-HANDLER-TIMER (NEW-VALUE INSTANCE)

SETFFD-HANDLER-TYPE (NEW-VALUE INSTANCE)

FD-HAS-ERROR-HANDLER-P (EVENT-BASE FD)

FD-MONITORED-P (EVENT-BASE FD EVENT-TYPE)

FIND-MAX-FD (FD-SET END)

HARVEST-SELECT-EVENTS (MAX-FD READ-FDS WRITE-FDS EXCEPT-FDS)

HARVEST-SELECT-FD-ERRORS (READ-FDS WRITE-FDS MAX-FD)

HEAP-EXTRACT (HEAP I &KEY (KEY #'IDENTITY) (TEST #'>=))

HEAP-EXTRACT-MIMIMUM (HEAP &KEY (KEY #'IDENTITY) (TEST #'>=))

HEAP-INSERT (HEAP NEW-ITEM &KEY (KEY #'IDENTITY) (TEST #'>=))

HEAP-LEFT (I)

HEAP-MIMIMUM (HEAP)

HEAP-PARENT (I)

HEAP-RIGHT (I)

HEAP-SIZE (HEAP)

HEAPIFY (HEAP START &KEY (KEY #'IDENTITY) (TEST #'>=))

MAKE-EPOLL-EVENT (FD MASK)

MAKE-FD-ENTRY (FD)

MAKE-FD-HANDLER (FD TYPE CALLBACK ONE-SHOT-P &OPTIONAL (TIMER NIL))

MAKE-PRIORITY-QUEUE (&KEY (KEY #'IDENTITY) (ELEMENT-TYPE T))

MAKE-TIMER (FUNCTION DELAY &KEY NAME ONE-SHOT)

PEEK-SCHEDULE (SCHEDULE)

PRIORITY-QUEUE-EMPTY-P (PRIORITY-QUEUE)

PRIORITY-QUEUE-P (OBJECT)

PRIORITY-QUEUE-REORDER (PRIORITY-QUEUE)

PROCESS-POLL-REVENTS (REVENTS FD)

RECALC-FD-MASKS (MUX FD READ WRITE)

RESCHEDULE-TIMER (SCHEDULE TIMER)

RESCHEDULE-TIMER-RELATIVE-TO-NOW (TIMER NOW)

RESET-TIMER (TIMER)

SCHEDULE-TIMER (SCHEDULE TIMER)

TIME-TO-NEXT-TIMER (SCHEDULE)

TIMEOUT->MILLISECONDS (TIMEOUT)

TIMEOUT->TIMESPEC (TIMEOUT TS)

TIMEOUT->TIMEVAL (TIMEOUT TV)

TIMER-EXPIRED-P (TIMER NOW &OPTIONAL (DELTA 0.0d0))

TIMER-NAME (TIMER)

TIMER-P (OBJECT)

TIMER-RESCHEDULABLE-P (TIMER)

UNSCHEDULE-TIMER (SCHEDULE TIMER)

MACRO

Public

WITH-EVENT-BASE ((VAR &REST INITARGS) &BODY BODY)

Binds VAR to a new EVENT-BASE, instantiated with INITARGS, within the extent of BODY. Closes VAR.

Private

Undocumented

DEFINE-MULTIPLEXER (NAME PRIORITY SUPERCLASSES SLOTS &REST OPTIONS)

GENERIC-FUNCTION

Public

Undocumented

ADD-TIMER (EVENT-BASE FUNCTION TIMEOUT &KEY ONE-SHOT)

EVENT-BASE-EMPTY-P (EVENT-BASE)

EVENT-DISPATCH (EVENT-BASE &KEY ONE-SHOT TIMEOUT MIN-STEP MAX-STEP)

EXIT-EVENT-LOOP (EVENT-BASE &KEY DELAY (DELAY 0))

POLL-ERROR-FD (CONDITION)

POLL-ERROR-IDENTIFIER (CONDITION)

POLL-TIMEOUT-EVENT-TYPE (CONDITION)

POLL-TIMEOUT-FD (CONDITION)

REMOVE-FD-HANDLERS (EVENT-BASE FD &KEY READ WRITE ERROR)

REMOVE-TIMER (EVENT-BASE TIMER)

SET-ERROR-HANDLER (EVENT-BASE FD FUNCTION)

SET-IO-HANDLER (EVENT-BASE FD EVENT-TYPE FUNCTION &KEY TIMEOUT ONE-SHOT)

Private

CLOSE-MULTIPLEXER (MUX)

Close multiplexer MUX, calling close() on the multiplexer's FD if bound.

HARVEST-EVENTS (MUX TIMEOUT)

Wait for events on multiplexer MUX for a maximum time of TIMEOUT seconds. Returns a list of fd/result pairs which have one of these forms: (fd (:read)) (fd (:write)) (fd (:read :write)) (fd . :error)

MONITOR-FD (MUX FD-ENTRY)

Add the descriptor reppresented by FD-ENTRY to multiplexer MUX. Must return NIL on failure, T otherwise.

UNMONITOR-FD (MUX FD-ENTRY)

Remove the descriptor reppresented by FD-ENTRY from multiplexer MUX. Must return NIL on failure, T otherwise.

UPDATE-FD (MUX FD-ENTRY EVENT-TYPE EDGE-CHANGE)

Update the status of the descriptor reppresented by FD-ENTRY in multiplexer MUX. Must return NIL on failure, T otherwise.

SLOT-ACCESSOR

Private

Undocumented

EXCEPT-FD-SET-OF (OBJECT)

EXIT-P (OBJECT)

SETFEXIT-P (NEW-VALUE OBJECT)

EXIT-WHEN-EMPTY-P (OBJECT)

SETFEXIT-WHEN-EMPTY-P (NEW-VALUE OBJECT)

EXPIRED-EVENTS-OF (OBJECT)

SETFEXPIRED-EVENTS-OF (NEW-VALUE OBJECT)

FD-LIMIT-OF (OBJECT)

FD-OF (OBJECT)

FD-TIMERS-OF (OBJECT)

FDS-OF (OBJECT)

MAX-FD-OF (OBJECT)

SETFMAX-FD-OF (NEW-VALUE OBJECT)

MULTIPLEXER-CLOSEDP (OBJECT)

SETFMULTIPLEXER-CLOSEDP (NEW-VALUE OBJECT)

MUX-OF (OBJECT)

READ-FD-SET-OF (OBJECT)

TIMERS-OF (OBJECT)

WRITE-FD-SET-OF (OBJECT)

VARIABLE

Public

*AVAILABLE-MULTIPLEXERS*

An alist of (PRIORITY . MULTIPLEXER). Smaller values mean higher priority.

*DEFAULT-MULTIPLEXER*

The default multiplexer for the current OS.

Private

Undocumented

*MAXIMUM-EVENT-LOOP-STEP*

*MINIMUM-EVENT-LOOP-STEP*

CLASS

Public

MULTIPLEXER

Base class for I/O multiplexers.

Undocumented

EPOLL-MULTIPLEXER

EVENT-BASE

SELECT-MULTIPLEXER

TIMER

Private

Undocumented

FD-ENTRY

FD-HANDLER

PRIORITY-QUEUE

CONDITION

Public

POLL-ERROR

Signaled when an error occurs while polling for I/O readiness of a file descriptor.

POLL-TIMEOUT

Signaled when a timeout occurs while polling for I/O readiness of a file descriptor.

CONSTANT

Private

Undocumented

+EPOLL-DEFAULT-SIZE-HINT+

+EPOLL-MAX-EVENTS+

+EPOLL-PRIORITY+

+SELECT-PRIORITY+