mirror of
https://github.com/zeromq/libzmq.git
synced 2025-10-13 14:45:38 +02:00
problem: browser cannot communicate with zeromq directly
Solution: implement ZWS 2.0 which websocket transport for zeromq
This commit is contained in:
@@ -35,6 +35,7 @@
|
||||
#include "pipe.hpp"
|
||||
#include "likely.hpp"
|
||||
#include "tcp_connecter.hpp"
|
||||
#include "ws_connecter.hpp"
|
||||
#include "ipc_connecter.hpp"
|
||||
#include "tipc_connecter.hpp"
|
||||
#include "socks_connecter.hpp"
|
||||
@@ -559,6 +560,8 @@ zmq::session_base_t::connecter_factory_entry_t
|
||||
zmq::session_base_t::_connecter_factories[] = {
|
||||
connecter_factory_entry_t (protocol_name::tcp,
|
||||
&zmq::session_base_t::create_connecter_tcp),
|
||||
connecter_factory_entry_t (protocol_name::ws,
|
||||
&zmq::session_base_t::create_connecter_ws),
|
||||
#if !defined ZMQ_HAVE_WINDOWS && !defined ZMQ_HAVE_OPENVMS \
|
||||
&& !defined ZMQ_HAVE_VXWORKS
|
||||
connecter_factory_entry_t (protocol_name::ipc,
|
||||
@@ -681,6 +684,13 @@ zmq::own_t *zmq::session_base_t::create_connecter_tcp (io_thread_t *io_thread_,
|
||||
tcp_connecter_t (io_thread_, this, options, _addr, wait_);
|
||||
}
|
||||
|
||||
zmq::own_t *zmq::session_base_t::create_connecter_ws (io_thread_t *io_thread_,
|
||||
bool wait_)
|
||||
{
|
||||
return new (std::nothrow)
|
||||
ws_connecter_t (io_thread_, this, options, _addr, wait_);
|
||||
}
|
||||
|
||||
#ifdef ZMQ_HAVE_OPENPGM
|
||||
void zmq::session_base_t::start_connecting_pgm (io_thread_t *io_thread_)
|
||||
{
|
||||
|
Reference in New Issue
Block a user