OpenMAMA
io.h File Reference
#include <mama/types.h>
#include <mama/status.h>

Go to the source code of this file.

Typedefs

typedef void(MAMACALLTYPE * mamaIoCb) (mamaIo io, mamaIoType ioType, void *closure)
 Prototype for callback invoked by IO handler. More...
 

Enumerations

enum  mamaIoType {
  MAMA_IO_READ, MAMA_IO_WRITE, MAMA_IO_CONNECT, MAMA_IO_ACCEPT,
  MAMA_IO_CLOSE, MAMA_IO_ERROR, MAMA_IO_EXCEPT
}
 IO Types. More...
 

Functions

MAMAExpDLL mama_status mamaIo_create (mamaIo *result, mamaQueue queue, uint32_t descriptor, mamaIoCb action, mamaIoType ioType, void *closure)
 Create a IO handler. More...
 
MAMAExpDLL mama_status mamaIo_getDescriptor (mamaIo io, uint32_t *d)
 Get the descriptor. More...
 
MAMAExpDLL mama_status mamaIo_destroy (mamaIo io)
 Destroy the IO. More...
 

Typedef Documentation

◆ mamaIoCb

typedef void(MAMACALLTYPE * mamaIoCb) (mamaIo io, mamaIoType ioType, void *closure)

Prototype for callback invoked by IO handler.

Parameters
ioThe mamaIo handle.
ioTypeThe mamaIoType for the event.
closureCaller supplied closure.

Enumeration Type Documentation

◆ mamaIoType

enum mamaIoType

IO Types.

Not all implementation support all mamaIoTypes.

MAMA_IO_READ: the socket is readable. MAMA_IO_WRITE: the socket is writable. MAMA_IO_CONNECT: the socket is connected MAMA_IO_ACCEPT: the socket accepted a connection MAMA_IO_CLOSE: the socket was closed MAMA_IO_ERROR: an error occurred MAMA_IO_EXCEPT: An exceptional event like out of band data occurred.

Enumerator
MAMA_IO_READ 
MAMA_IO_WRITE 
MAMA_IO_CONNECT 
MAMA_IO_ACCEPT 
MAMA_IO_CLOSE 
MAMA_IO_ERROR 
MAMA_IO_EXCEPT 
45 {
53 } mamaIoType;
Definition: io.h:50
Definition: io.h:49
Definition: io.h:52
Definition: io.h:51
Definition: io.h:46
Definition: io.h:48
mamaIoType
IO Types.
Definition: io.h:44
Definition: io.h:47

Function Documentation

◆ mamaIo_create()

MAMAExpDLL mama_status mamaIo_create ( mamaIo result,
mamaQueue  queue,
uint32_t  descriptor,
mamaIoCb  action,
mamaIoType  ioType,
void *  closure 
)

Create a IO handler.

If the underlying infrastructure does not support the requested mamaIoType, mamaIo_create returns MAMA_STATUS_UNSUPPORTED_IO_TYPE. For example RV only supports READ, WRITE, and EXCEPT. LBM supports all types except ERROR.

Parameters
resultA pointer to the io handle.
queueThe event queue for the io events. NULL specifies the Mama default queue.
actionThe callback to be invoked when an event occurs.
descriptorWait for IO on this descriptor.
ioTypeWait for occurrences of this type.
closureThe closure that is passed to the callback.

◆ mamaIo_getDescriptor()

MAMAExpDLL mama_status mamaIo_getDescriptor ( mamaIo  io,
uint32_t *  d 
)

Get the descriptor.

◆ mamaIo_destroy()

MAMAExpDLL mama_status mamaIo_destroy ( mamaIo  io)

Destroy the IO.



© 2012 Linux Foundation