Lely core libraries  2.2.5
event.hpp File Reference

This header file is part of the I/O library; it contains the C++ interface for the I/O events. More...

#include <lely/io2/event.h>
Include dependency graph for event.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum class  lely::io::Event {
  IN = IO_EVENT_IN , PRI = IO_EVENT_PRI , OUT = IO_EVENT_OUT , ERR = IO_EVENT_ERR ,
  HUP = IO_EVENT_HUP , NONE = IO_EVENT_NONE , MASK = IO_EVENT_MASK
}
 The type of I/O event monitored by lely::io::Poll::watch() and reported to io_poll_watch_func_t callback functions. More...
 

Detailed Description

This header file is part of the I/O library; it contains the C++ interface for the I/O events.

See also
lely/io2/watch.h
Author
J. S. Seldenthuis jseld.nosp@m.enth.nosp@m.uis@l.nosp@m.ely..nosp@m.com

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Definition in file event.hpp.

Enumeration Type Documentation

◆ Event

enum lely::io::Event
strong

The type of I/O event monitored by lely::io::Poll::watch() and reported to io_poll_watch_func_t callback functions.

Enumerator
IN 

Data (other than priority data) MAY be read without blocking.

For connection-oriented socket, this event is also reported when the peer closed the connection. For listening sockets, this event indicates that there are pending connections waiting to be accepted.

PRI 

Priority data MAY be read without blocking.

For sockets, this event typically indicates the presence of out-of-band data.

OUT 

Data (bot normal and priority data) MAY be written without blocking.

For connection-oriented sockets, this event is also reported when a connection attempt completes (with success or failure).

ERR 

An error has occurred. This event is always reported.

HUP 

The device has been disconnected.

For connection-oriented sockets, this event is reported when a connection is shut down (by closesocket() on Windows or shutdown(socket, SHUT_RDWR) on POSIX plafforms) or when a connection attempt fails. This event is always reported.

Definition at line 45 of file event.hpp.