~ubuntu-branches/ubuntu/precise/zeromq/precise

« back to all changes in this revision

Viewing changes to src/pgm_sender.hpp

  • Committer: Bazaar Package Importer
  • Author(s): Martin Lucina
  • Date: 2011-05-13 12:43:09 UTC
  • mfrom: (7.2.1 sid)
  • Revision ID: james.westby@ubuntu.com-20110513124309-m3gdt964ga67rcwu
Tags: 2.1.7-1
* New upstream version. (closes: #619374)
* --with-system-pgm is now used instead of the embedded OpenPGM library. 
* Added Debian watch file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
    Copyright (c) 2007-2010 iMatix Corporation
 
2
    Copyright (c) 2007-2011 iMatix Corporation
 
3
    Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file
3
4
 
4
5
    This file is part of 0MQ.
5
6
 
6
7
    0MQ is free software; you can redistribute it and/or modify it under
7
 
    the terms of the Lesser GNU General Public License as published by
 
8
    the terms of the GNU Lesser General Public License as published by
8
9
    the Free Software Foundation; either version 3 of the License, or
9
10
    (at your option) any later version.
10
11
 
11
12
    0MQ is distributed in the hope that it will be useful,
12
13
    but WITHOUT ANY WARRANTY; without even the implied warranty of
13
14
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 
    Lesser GNU General Public License for more details.
 
15
    GNU Lesser General Public License for more details.
15
16
 
16
 
    You should have received a copy of the Lesser GNU General Public License
 
17
    You should have received a copy of the GNU Lesser General Public License
17
18
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
18
19
*/
19
20
 
33
34
#include "i_engine.hpp"
34
35
#include "options.hpp"
35
36
#include "pgm_socket.hpp"
36
 
#include "zmq_encoder.hpp"
 
37
#include "encoder.hpp"
37
38
 
38
39
namespace zmq
39
40
{
49
50
        int init (bool udp_encapsulation_, const char *network_);
50
51
 
51
52
        //  i_engine interface implementation.
52
 
        void plug (struct i_inout *inout_);
 
53
        void plug (class io_thread_t *io_thread_, struct i_inout *inout_);
53
54
        void unplug ();
54
 
        void revive ();
55
 
        void resume_input ();
 
55
        void terminate ();
 
56
        void activate_in ();
 
57
        void activate_out ();
56
58
 
57
59
        //  i_poll_events interface implementation.
58
60
        void in_event ();
59
61
        void out_event ();
 
62
        void timer_event (int token);
60
63
 
61
64
    private:
62
65
 
 
66
        //  TX and RX timeout timer ID's.
 
67
        enum {tx_timer_id = 0xa0, rx_timer_id = 0xa1};
 
68
 
 
69
        //  Timers are running.
 
70
        bool has_tx_timer;
 
71
        bool has_rx_timer;
 
72
 
63
73
        //  Message encoder.
64
 
        zmq_encoder_t encoder;
 
74
        encoder_t encoder;
65
75
 
66
76
        //  PGM socket.
67
77
        pgm_socket_t pgm_socket;
86
96
        size_t write_size;
87
97
 
88
98
        pgm_sender_t (const pgm_sender_t&);
89
 
        void operator = (const pgm_sender_t&);
 
99
        const pgm_sender_t &operator = (const pgm_sender_t&);
90
100
    };
91
101
 
92
102
}