Bonjour,

la bibliothèque POCO présente des exemples pour ses principales classes.

Dans l'un d'eux, on peut lire :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
class EchoServiceHandler
{
public:
	EchoServiceHandler(StreamSocket& socket, SocketReactor& reactor):
		_socket(socket),
		_reactor(reactor),
		_pBuffer(new char[BUFFER_SIZE])
	{
		Application& app = Application::instance();
		app.logger().information("Connection from " + socket.peerAddress().toString());
 
		_reactor.addEventHandler(_socket, NObserver<EchoServiceHandler, ReadableNotification>(*this, &EchoServiceHandler::onReadable));
		_reactor.addEventHandler(_socket, NObserver<EchoServiceHandler, ShutdownNotification>(*this, &EchoServiceHandler::onShutdown));
	}
Je ne comprends pas quelle est la syntaxe de cette méthode : à correspond cette notation du deux-points suivi d'arguments ?


D'ailleurs, quel serait le prototype de cette méthode, dans un header ?

Merci,

Sylvain