AMQP-CPP

Function monitor

Synopsis

#include <AMQP-CPP/include/tcphandler.h>

virtual void AMQP::TcpHandler::monitor(TcpConnection *connection, int fd, int flags)=0

Description

Monitor a filedescriptor for readability or writability

When a TCP connection is opened, it creates a non-blocking socket connection. This method is called to inform you about this socket, so that you can include it in the event loop. When the socket becomes active, you should call the "process()" method in the Tcp class.

The flags is AMQP::readable if the filedescriptor should be monitored for readability, AMQP::writable if it is to be monitored for writability, or AMQP::readable | AMQP::writable if it has to be checked for both. If flags has value 0, the filedescriptor should be removed from the event loop.

Parameters

connection

The TCP connection object that is reporting

fd

The filedescriptor to be monitored

flags

Should the object be monitored for readability or writability?

Examples

//
//

Source

virtual void AMQP::TcpHandler::monitor(TcpConnection *connection, int fd, int flags)=0 has no body



Discussions

There are 0 discussions relevant for this page, and 1 discussions in the whole project.




Add Discussion

Log in to comment