tcp_listener.hpp
Go to the documentation of this file.
1 /* SPDX-License-Identifier: MPL-2.0 */
2 
3 #ifndef __ZMQ_TCP_LISTENER_HPP_INCLUDED__
4 #define __ZMQ_TCP_LISTENER_HPP_INCLUDED__
5 
6 #include "fd.hpp"
7 #include "tcp_address.hpp"
9 
10 namespace zmq
11 {
12 class tcp_listener_t ZMQ_FINAL : public stream_listener_base_t
13 {
14  public:
15  tcp_listener_t (zmq::io_thread_t *io_thread_,
16  zmq::socket_base_t *socket_,
17  const options_t &options_);
18 
19  // Set address to listen on.
20  int set_local_address (const char *addr_);
21 
22  protected:
23  std::string get_socket_name (fd_t fd_, socket_end_t socket_end_) const;
24 
25  private:
26  // Handlers for I/O events.
27  void in_event ();
28 
29  // Accept the new connection. Returns the file descriptor of the
30  // newly created connection. The function may return retired_fd
31  // if the connection was dropped while waiting in the listen backlog
32  // or was denied because of accept filters.
33  fd_t accept ();
34 
35  int create_socket (const char *addr_);
36 
37  // Address to listen on.
39 
40  ZMQ_NON_COPYABLE_NOR_MOVABLE (tcp_listener_t)
41 };
42 }
43 
44 #endif
zmq::get_socket_name
std::string get_socket_name(fd_t fd_, socket_end_t socket_end_)
Definition: address.hpp:120
zmq::ZMQ_FINAL::_address
tcp_address_t _address
Definition: tcp_listener.hpp:38
string
GLsizei const GLchar *const * string
Definition: glcorearb.h:3083
zmq::socket_base_t
Definition: socket_base.hpp:31
zmq
Definition: zmq.hpp:229
zmq::tcp_address_t
Definition: tcp_address.hpp:15
ZMQ_NON_COPYABLE_NOR_MOVABLE
#define ZMQ_NON_COPYABLE_NOR_MOVABLE(classname)
Definition: macros.hpp:58
tcp_address.hpp
fd.hpp
stream_listener_base.hpp
fd_t
zmq_fd_t fd_t
Definition: libzmq/tests/testutil.hpp:98
zmq::socket_end_t
socket_end_t
Definition: address.hpp:110
ZMQ_FINAL
Definition: unittest_ip_resolver.cpp:26
options_
DebugStringOptions options_
Definition: src/google/protobuf/descriptor.cc:2410


libaditof
Author(s):
autogenerated on Wed May 21 2025 02:06:59