Changeset View
Changeset View
Standalone View
Standalone View
src/torcontrol.cpp
Show First 20 Lines • Show All 73 Lines • ▼ Show 20 Lines | |||||
class TorControlConnection { | class TorControlConnection { | ||||
public: | public: | ||||
typedef std::function<void(TorControlConnection &)> ConnectionCB; | typedef std::function<void(TorControlConnection &)> ConnectionCB; | ||||
typedef std::function<void(TorControlConnection &, const TorControlReply &)> | typedef std::function<void(TorControlConnection &, const TorControlReply &)> | ||||
ReplyHandlerCB; | ReplyHandlerCB; | ||||
/** Create a new TorControlConnection. | /** Create a new TorControlConnection. | ||||
*/ | */ | ||||
TorControlConnection(struct event_base *base); | explicit TorControlConnection(struct event_base *base); | ||||
~TorControlConnection(); | ~TorControlConnection(); | ||||
/** | /** | ||||
* Connect to a Tor control port. | * Connect to a Tor control port. | ||||
* target is address of the form host:port. | * target is address of the form host:port. | ||||
* connected is the handler that is called when connection is successfully | * connected is the handler that is called when connection is successfully | ||||
* established. | * established. | ||||
* disconnected is a handler that is called when the connection is broken. | * disconnected is a handler that is called when the connection is broken. | ||||
▲ Show 20 Lines • Show All 722 Lines • Show Last 20 Lines |