|
glibmm
2.46.2
|
#include <giomm/socketsource.h>
Public Member Functions | |
| sigc::connection | connect (const sigc::slot< bool, Glib::IOCondition >& slot, const Glib::RefPtr< Socket >& socket, Glib::IOCondition condition, const Glib::RefPtr< Cancellable >& cancellable=Glib::RefPtr< Cancellable >(), int priority=Glib::PRIORITY_DEFAULT) |
| Connects an I/O handler that watches a socket. More... | |
| sigc::connection Gio::SignalSocket::connect | ( | const sigc::slot< bool, Glib::IOCondition >& | slot, |
| const Glib::RefPtr< Socket >& | socket, | ||
| Glib::IOCondition | condition, | ||
| const Glib::RefPtr< Cancellable >& | cancellable = Glib::RefPtr< Cancellable >(), |
||
| int | priority = Glib::PRIORITY_DEFAULT |
||
| ) |
Connects an I/O handler that watches a socket.
is equivalent to:
This method is not thread-safe. You should call it, or manipulate the returned sigc::connection object, only from the thread where the SignalSocket object's MainContext runs.
| slot | A slot to call when polling socket results in an event that matches condition. The event will be passed as a parameter to slot. If io_handler() returns false the handler is disconnected. |
| socket | The Socket object to watch. |
| condition | The conditions to watch for. |
| cancellable | A Cancellable object which can be used to cancel the source, which will cause the source to trigger, reporting the current condition (which is likely 0 unless cancellation happened at the same time as a condition change). You can check for this in the callback using Cancellable::is_cancelled(). |
| priority | The priority of the new event source. |
1.8.9.1