summaryrefslogtreecommitdiff
path: root/src/pgm_socket.hpp
diff options
context:
space:
mode:
authorMartin Lucina <mato@kotelna.sk>2011-03-28 10:39:51 +0200
committerMartin Lucina <martin@lucina.net>2012-01-23 08:53:37 +0100
commit3e20cb1b8a2b1ca222011df37334e5f4f88dd565 (patch)
tree4a753775186bc7f583f1ceb3f9aa675b6f110596 /src/pgm_socket.hpp
parent3f0085ddbef1a44b6bb7a0b23af497d56e0025fa (diff)
parente645fc2693acc796304498909786b7b47005b429 (diff)
Imported Debian patch 2.1.3-1debian/2.1.3-1
Diffstat (limited to 'src/pgm_socket.hpp')
-rw-r--r--src/pgm_socket.hpp29
1 files changed, 21 insertions, 8 deletions
diff --git a/src/pgm_socket.hpp b/src/pgm_socket.hpp
index b9f55d1..9699aed 100644
--- a/src/pgm_socket.hpp
+++ b/src/pgm_socket.hpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file
This file is part of 0MQ.
0MQ is free software; you can redistribute it and/or modify it under
- the terms of the Lesser GNU General Public License as published by
+ the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
0MQ is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -28,8 +29,13 @@
#include "windows.hpp"
#endif
+#define __PGM_WININT_H__
#include <pgm/pgm.h>
+#ifdef ZMQ_HAVE_OSX
+#include <pgm/in.h>
+#endif
+
#include "options.hpp"
namespace zmq
@@ -39,9 +45,8 @@ namespace zmq
{
public:
+
// If receiver_ is true PGM transport is not generating SPM packets.
- // interface format: iface;mcast_group:port for raw PGM socket
- // udp:iface;mcast_goup:port for UDP encapsulacion
pgm_socket_t (bool receiver_, const options_t &options_);
// Closes the transport.
@@ -67,14 +72,22 @@ namespace zmq
// Receive data from pgm socket.
ssize_t receive (void **data_, const pgm_tsi_t **tsi_);
+ long get_rx_timeout ();
+ long get_tx_timeout ();
+
// POLLIN on sender side should mean NAK or SPMR receiving.
// process_upstream function is used to handle such a situation.
void process_upstream ();
private:
+
+ // Compute size of the buffer based on rate and recovery interval.
+ int compute_sqns (int tpdu_);
- // OpenPGM transport
- pgm_transport_t* transport;
+ // OpenPGM transport.
+ pgm_sock_t* sock;
+
+ int last_rx_status, last_tx_status;
// Associated socket options.
options_t options;