From e645fc2693acc796304498909786b7b47005b429 Mon Sep 17 00:00:00 2001 From: Martin Lucina Date: Mon, 23 Jan 2012 08:53:35 +0100 Subject: Imported Upstream version 2.1.3 --- src/pgm_socket.hpp | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) (limited to 'src/pgm_socket.hpp') 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 . */ @@ -28,8 +29,13 @@ #include "windows.hpp" #endif +#define __PGM_WININT_H__ #include +#ifdef ZMQ_HAVE_OSX +#include +#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; -- cgit v1.2.3