libzmq
src
ws_listener.hpp
Go to the documentation of this file.
1
/* SPDX-License-Identifier: MPL-2.0 */
2
3
#ifndef __ZMQ_WS_LISTENER_HPP_INCLUDED__
4
#define __ZMQ_WS_LISTENER_HPP_INCLUDED__
5
6
#include "
fd.hpp
"
7
#include "
ws_address.hpp
"
8
#include "
stream_listener_base.hpp
"
9
10
#ifdef ZMQ_USE_GNUTLS
11
#include <gnutls/gnutls.h>
12
#endif
13
14
namespace
zmq
15
{
16
class
ws_listener_t
ZMQ_FINAL
:
public
stream_listener_base_t
17
{
18
public
:
19
ws_listener_t (zmq::io_thread_t *io_thread_,
20
zmq::socket_base_t
*socket_,
21
const
options_t &
options_
,
22
bool
wss_);
23
24
~ws_listener_t ();
25
26
// Set address to listen on.
27
int
set_local_address (
const
char
*addr_);
28
29
protected
:
30
std::string
get_socket_name
(
fd_t
fd_,
socket_end_t
socket_end_)
const
;
31
void
create_engine (
fd_t
fd);
32
33
private
:
34
// Handlers for I/O events.
35
void
in_event ();
36
37
// Accept the new connection. Returns the file descriptor of the
38
// newly created connection. The function may return retired_fd
39
// if the connection was dropped while waiting in the listen backlog
40
// or was denied because of accept filters.
41
fd_t
accept ();
42
43
int
create_socket (
const
char
*addr_);
44
45
// Address to listen on.
46
ws_address_t
_address
;
47
48
bool
_wss;
49
#ifdef ZMQ_HAVE_WSS
50
gnutls_certificate_credentials_t _tls_cred;
51
#endif
52
53
ZMQ_NON_COPYABLE_NOR_MOVABLE
(ws_listener_t)
54
};
55
}
56
57
#endif
zmq::get_socket_name
std::string get_socket_name(fd_t fd_, socket_end_t socket_end_)
Definition:
address.hpp:120
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_NON_COPYABLE_NOR_MOVABLE
#define ZMQ_NON_COPYABLE_NOR_MOVABLE(classname)
Definition:
macros.hpp:58
fd.hpp
zmq::ws_address_t
Definition:
ws_address.hpp:15
ws_address.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::ZMQ_FINAL::_address
ws_address_t _address
Definition:
ws_listener.hpp:46
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:07:02