plain_mechanism now uses options.as_server

- we need to switch to PLAIN according to options.mechanism
- we need to catch case when both peers are as-server (or neither is)
- and to use username/password from options, for client
This commit is contained in:
Pieter Hintjens
2013-05-17 17:46:30 +02:00
parent da1e9a178a
commit f909b9c722
11 changed files with 141 additions and 105 deletions

View File

@@ -126,7 +126,7 @@ void zmq::tcp_connecter_t::out_event ()
// Create the engine object for this connection.
stream_engine_t *engine = new (std::nothrow)
stream_engine_t (fd, options, false, endpoint);
stream_engine_t (fd, options, endpoint);
alloc_assert (engine);
// Attach the engine to the corresponding session object.