From 8463b4d55e45ea29d5a23f867e7f1c0077279ee7 Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Thu, 24 Mar 2011 12:27:06 +0100 Subject: SWAP functionality removed On-disk storage should be implemented in devices rather than in 0MQ core. 0MQ is a networking library and there's no point in storing network buffers on disk. Signed-off-by: Martin Sustrik --- src/socket_base.cpp | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) (limited to 'src/socket_base.cpp') diff --git a/src/socket_base.cpp b/src/socket_base.cpp index abeddb9..093bbe0 100644 --- a/src/socket_base.cpp +++ b/src/socket_base.cpp @@ -376,28 +376,22 @@ int zmq::socket_base_t::connect (const char *addr_) writer_t *outpipe_writer = NULL; // The total HWM for an inproc connection should be the sum of - // the binder's HWM and the connector's HWM. (Similarly for the - // SWAP.) + // the binder's HWM and the connector's HWM. int64_t hwm; if (options.hwm == 0 || peer.options.hwm == 0) hwm = 0; else hwm = options.hwm + peer.options.hwm; - int64_t swap; - if (options.swap == 0 && peer.options.swap == 0) - swap = 0; - else - swap = options.swap + peer.options.swap; // Create inbound pipe, if required. if (options.requires_in) - create_pipe (this, peer.socket, hwm, swap, - &inpipe_reader, &inpipe_writer); + create_pipe (this, peer.socket, hwm, &inpipe_reader, + &inpipe_writer); // Create outbound pipe, if required. if (options.requires_out) - create_pipe (peer.socket, this, hwm, swap, - &outpipe_reader, &outpipe_writer); + create_pipe (peer.socket, this, hwm, &outpipe_reader, + &outpipe_writer); // Attach the pipes to this socket object. attach_pipes (inpipe_reader, outpipe_writer, peer.options.identity); @@ -435,12 +429,12 @@ int zmq::socket_base_t::connect (const char *addr_) // Create inbound pipe, if required. if (options.requires_in) - create_pipe (this, session, options.hwm, options.swap, + create_pipe (this, session, options.hwm, &inpipe_reader, &inpipe_writer); // Create outbound pipe, if required. if (options.requires_out) - create_pipe (session, this, options.hwm, options.swap, + create_pipe (session, this, options.hwm, &outpipe_reader, &outpipe_writer); // Attach the pipes to the socket object. -- cgit v1.2.3