mirror of
				https://github.com/zeromq/libzmq.git
				synced 2025-10-30 05:29:43 +01:00 
			
		
		
		
	Session class separated into socket-type-specific sessions
This is a preliminary patch allowing for socket-type-specific functionality in the I/O thread. For example, message format can be checked asynchronously and misbehaved connections dropped straight away. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
This commit is contained in:
		
							
								
								
									
										16
									
								
								src/pull.hpp
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								src/pull.hpp
									
									
									
									
									
								
							| @@ -22,6 +22,7 @@ | ||||
| #define __ZMQ_PULL_HPP_INCLUDED__ | ||||
|  | ||||
| #include "socket_base.hpp" | ||||
| #include "session_base.hpp" | ||||
| #include "fq.hpp" | ||||
|  | ||||
| namespace zmq | ||||
| @@ -54,6 +55,21 @@ namespace zmq | ||||
|  | ||||
|     }; | ||||
|  | ||||
|     class pull_session_t : public session_base_t | ||||
|     { | ||||
|     public: | ||||
|  | ||||
|         pull_session_t (class io_thread_t *io_thread_, bool connect_, | ||||
|             class socket_base_t *socket_, const options_t &options_, | ||||
|             const char *protocol_, const char *address_); | ||||
|         ~pull_session_t (); | ||||
|  | ||||
|     private: | ||||
|  | ||||
|         pull_session_t (const pull_session_t&); | ||||
|         const pull_session_t &operator = (const pull_session_t&); | ||||
|     }; | ||||
|  | ||||
| } | ||||
|  | ||||
| #endif | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Martin Sustrik
					Martin Sustrik