nl:: Inet:: SocketEvents
#include <src/inet/InetLayerBasis.h>
Represent a set of I/O events requested/pending on a socket.
Summary
Constructors and Destructors |
|
---|---|
SocketEvents()
Constructor for the SocketEvents class.
|
|
SocketEvents(const SocketEvents & other)
Copy constructor for the SocketEvents class.
|
Public types |
|
---|---|
@6{
|
enum |
Public attributes |
|
---|---|
Value
|
int
Contains the bit flags for the socket event.
|
Public functions |
|
---|---|
Clear()
|
void
Clear the bit flags for the socket.
|
ClearError()
|
void
Clear the error bit flag for the socket.
|
ClearRead()
|
void
Clear the read bit flag for the socket.
|
ClearWrite()
|
void
Clear the write bit flag for the socket.
|
IsError() const
|
bool
Check if the bit flags indicate that the socket has an error.
|
IsReadable() const
|
bool
Check if the bit flags indicate that the socket is readable.
|
IsSet() const
|
bool
Check if any of the bit flags for the socket events are set.
|
IsWriteable() const
|
bool
Check if the bit flags indicate that the socket is writable.
|
SetError()
|
void
Set the error bit flag for the socket.
|
SetFDs(int socket, int & nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds)
|
void
Sets the bit for the specified file descriptor in the given sets of file descriptors.
|
SetRead()
|
void
Set the read bit flag for the socket.
|
SetWrite()
|
void
Set the write bit flag for the socket.
|
Public static functions |
|
---|---|
FromFDs(int socket, fd_set *readfds, fd_set *writefds, fd_set *exceptfds)
|
Set the read, write or exception bit flags for the specified socket based on its status in the corresponding file descriptor sets.
|
Public types
@6
@6
Public attributes
Value
int Value
Contains the bit flags for the socket event.
Public functions
Clear
void Clear()
Clear the bit flags for the socket.
ClearError
void ClearError()
Clear the error bit flag for the socket.
ClearRead
void ClearRead()
Clear the read bit flag for the socket.
ClearWrite
void ClearWrite()
Clear the write bit flag for the socket.
IsError
bool IsError() const
Check if the bit flags indicate that the socket has an error.
Details | |
---|---|
Returns |
true if socket has an error, otherwise false.
|
IsReadable
bool IsReadable() const
Check if the bit flags indicate that the socket is readable.
Details | |
---|---|
Returns |
true if socket is readable, otherwise false.
|
IsSet
bool IsSet() const
Check if any of the bit flags for the socket events are set.
Details | |
---|---|
Returns |
true if set, otherwise false.
|
IsWriteable
bool IsWriteable() const
Check if the bit flags indicate that the socket is writable.
Details | |
---|---|
Returns |
true if socket is writable, otherwise false.
|
SetError
void SetError()
Set the error bit flag for the socket.
SetFDs
void SetFDs( int socket, int & nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds )
Sets the bit for the specified file descriptor in the given sets of file descriptors.
Details | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Parameters |
|
SetRead
void SetRead()
Set the read bit flag for the socket.
SetWrite
void SetWrite()
Set the write bit flag for the socket.
SocketEvents
SocketEvents( const SocketEvents & other )
Copy constructor for the SocketEvents class.
Public static functions
FromFDs
SocketEvents FromFDs( int socket, fd_set *readfds, fd_set *writefds, fd_set *exceptfds )
Set the read, write or exception bit flags for the specified socket based on its status in the corresponding file descriptor sets.
Details | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
|