mirror of
https://github.com/zeromq/libzmq.git
synced 2025-10-15 15:16:52 +02:00
renamed from zs to zmq
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
#include "ip.hpp"
|
||||
#include "err.hpp"
|
||||
|
||||
#ifdef ZS_HAVE_WINDOWS
|
||||
#ifdef ZMQ_HAVE_WINDOWS
|
||||
|
||||
#include "windows.hpp"
|
||||
#error
|
||||
@@ -37,20 +37,20 @@
|
||||
#include <netdb.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
zs::tcp_connecter_t::tcp_connecter_t () :
|
||||
zmq::tcp_connecter_t::tcp_connecter_t () :
|
||||
s (retired_fd)
|
||||
{
|
||||
}
|
||||
|
||||
zs::tcp_connecter_t::~tcp_connecter_t ()
|
||||
zmq::tcp_connecter_t::~tcp_connecter_t ()
|
||||
{
|
||||
if (s != retired_fd)
|
||||
close ();
|
||||
}
|
||||
|
||||
int zs::tcp_connecter_t::open (const char *addr_)
|
||||
int zmq::tcp_connecter_t::open (const char *addr_)
|
||||
{
|
||||
zs_assert (s == retired_fd);
|
||||
zmq_assert (s == retired_fd);
|
||||
|
||||
// Convert the hostname into sockaddr_in structure.
|
||||
sockaddr_in address;
|
||||
@@ -75,7 +75,7 @@ int zs::tcp_connecter_t::open (const char *addr_)
|
||||
rc = setsockopt (s, IPPROTO_TCP, TCP_NODELAY, (char*) &flag, sizeof (int));
|
||||
errno_assert (rc == 0);
|
||||
|
||||
#ifdef ZS_HAVE_OPENVMS
|
||||
#ifdef ZMQ_HAVE_OPENVMS
|
||||
// Disable delayed acknowledgements.
|
||||
flag = 1;
|
||||
rc = setsockopt (s, IPPROTO_TCP, TCP_NODELACK, (char*) &flag, sizeof (int));
|
||||
@@ -100,9 +100,9 @@ int zs::tcp_connecter_t::open (const char *addr_)
|
||||
return -1;
|
||||
}
|
||||
|
||||
int zs::tcp_connecter_t::close ()
|
||||
int zmq::tcp_connecter_t::close ()
|
||||
{
|
||||
zs_assert (s != retired_fd);
|
||||
zmq_assert (s != retired_fd);
|
||||
int rc = ::close (s);
|
||||
if (rc != 0)
|
||||
return -1;
|
||||
@@ -110,12 +110,12 @@ int zs::tcp_connecter_t::close ()
|
||||
return 0;
|
||||
}
|
||||
|
||||
zs::fd_t zs::tcp_connecter_t::get_fd ()
|
||||
zmq::fd_t zmq::tcp_connecter_t::get_fd ()
|
||||
{
|
||||
return s;
|
||||
}
|
||||
|
||||
zs::fd_t zs::tcp_connecter_t::connect ()
|
||||
zmq::fd_t zmq::tcp_connecter_t::connect ()
|
||||
{
|
||||
// Following code should handle both Berkeley-derived socket
|
||||
// implementations and Solaris.
|
||||
|
Reference in New Issue
Block a user