mirror of
				https://github.com/zeromq/libzmq.git
				synced 2025-10-30 05:29:43 +01:00 
			
		
		
		
	Merge in master changes
This commit is contained in:
		
							
								
								
									
										18
									
								
								src/pipe.hpp
									
									
									
									
									
								
							
							
						
						
									
										18
									
								
								src/pipe.hpp
									
									
									
									
									
								
							| @@ -21,7 +21,7 @@ | ||||
| #define __ZMQ_PIPE_HPP_INCLUDED__ | ||||
|  | ||||
| #include "msg.hpp" | ||||
| #include "ypipe.hpp" | ||||
| #include "ypipe_base.hpp" | ||||
| #include "config.hpp" | ||||
| #include "object.hpp" | ||||
| #include "stdint.hpp" | ||||
| @@ -40,8 +40,10 @@ namespace zmq | ||||
|     //  Delay specifies how the pipe behaves when the peer terminates. If true | ||||
|     //  pipe receives all the pending messages before terminating, otherwise it | ||||
|     //  terminates straight away. | ||||
|     //  If conflate is true, only the most recently arrived message could be | ||||
|     //  read (older messages are discarded) | ||||
|     int pipepair (zmq::object_t *parents_ [2], zmq::pipe_t* pipes_ [2], | ||||
|         int hwms_ [2]); | ||||
|         int hwms_ [2], bool conflate_ [2]); | ||||
|  | ||||
|     struct i_pipe_events | ||||
|     { | ||||
| @@ -64,9 +66,9 @@ namespace zmq | ||||
|         public array_item_t <3> | ||||
|     { | ||||
|         //  This allows pipepair to create pipe objects. | ||||
|         friend int pipepair (zmq::object_t *parents_ [2], | ||||
|             zmq::pipe_t* pipes_ [2], int hwms_ [2]); | ||||
|  | ||||
|         friend int pipepair (zmq::object_t *parents_ [2], zmq::pipe_t* pipes_ [2], | ||||
|             int hwms_ [2], bool conflate_ [2]); | ||||
|              | ||||
|     public: | ||||
|  | ||||
|         //  Specifies the object to send events to. | ||||
| @@ -113,7 +115,7 @@ namespace zmq | ||||
|     private: | ||||
|  | ||||
|         //  Type of the underlying lock-free pipe. | ||||
|         typedef ypipe_t <msg_t, message_pipe_granularity> upipe_t; | ||||
|         typedef ypipe_base_t <msg_t, message_pipe_granularity> upipe_t; | ||||
|  | ||||
|         //  Command handlers. | ||||
|         void process_activate_read (); | ||||
| @@ -128,7 +130,7 @@ namespace zmq | ||||
|         //  Constructor is private. Pipe can only be created using | ||||
|         //  pipepair function. | ||||
|         pipe_t (object_t *parent_, upipe_t *inpipe_, upipe_t *outpipe_, | ||||
|             int inhwm_, int outhwm_); | ||||
|             int inhwm_, int outhwm_, bool conflate_); | ||||
|  | ||||
|         //  Pipepair uses this function to let us know about | ||||
|         //  the peer pipe object. | ||||
| @@ -199,6 +201,8 @@ namespace zmq | ||||
|         //  Computes appropriate low watermark from the given high watermark. | ||||
|         static int compute_lwm (int hwm_); | ||||
|  | ||||
|         bool conflate; | ||||
|  | ||||
|         //  Disable copying. | ||||
|         pipe_t (const pipe_t&); | ||||
|         const pipe_t &operator = (const pipe_t&); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Ian Barber
					Ian Barber