Open topic with navigation

TIBCO Rendezvous® 8.7.0

# tibrvEvent_CreateIO()

Function

## Declaration

    tibrv_status tibrvEvent_CreateIO(
        tibrvEvent*            event,
        tibrvQueue             queue,
        tibrvEventCallback     callback,
        tibrv_i32              socketId,
        tibrvIOType            ioType,
        const void*            closure);

## Purpose

Wait for specified I/O situations to occur.

Parameter | Description
`event` | For each I/O occurrence, place this event object on the event queue. The program supplies a location, and the function stores the new event object in that location. The event object remains valid until the program explicitly destroys it.
`queue` | For each I/O occurrence, place the event on this event queue.
`callback` | On dispatch, process the event with this callback function.
`socketID` | Wait for I/O occurrences on this socket.
`ioType` | Wait for I/O occurrences of this type. See tibrvIOType.
`closure` | Store this closure data in the event object.

## Activation and Dispatch

This function creates an event object that describes an I/O situation, and activates the event—that is, it requests notification from the operating system when that I/O situation occurs. When the situation occurs, Rendezvous software deactivates the event, and places the event object on its event queue. Dispatch removes the event object from the queue, and runs the callback function to process the event. When the callback function returns, Rendezvous software automatically reactivates the event. (To stop the cycle, destroy the event object; see tibrvEvent_Destroy().)

I/O Event Activation and Dispatch illustrates that Rendezvous software temporarily deactivates the I/O event from the time it enters the queue until its callback function returns. Consequently, an I/O object can cause at most one event at a time.

Figure 178: I/O Event Activation and Dispatch

## Semantics of I/O Events

The semantics of all I/O conditions depend on the underlying operating system and event manager. Rendezvous software does not change those semantics.

I/O events trigger when the operating system reports that an I/O condition on a monitored socket would succeed (that is, transfer at least one byte without blocking). Nonetheless, Rendezvous software cannot guarantee that a subsequent I/O call will not block.

## See Also

tibrvIOType

tibrvQueue

Did you find this helpful?

Yes No
Great!
Thanks for taking the time to give us some feedback.
Sorry about that

Why wasn't this helpful? (check all that apply)

Could not find what I was looking for
Instructions confusing or unclear
Instructions did not work

Want to tell us more?

Please select at least one option or provide details about the issue!!

Error occurred while submitting feedback.

Error2 occurred while submitting feedback.

TIBCO Rendezvous®

Copyright © 1997-2023. Cloud Software Group, Inc. All Rights Reserved.