renamed from zs to zmq

This commit is contained in:
Martin Sustrik
2009-08-03 11:30:13 +02:00
parent 183b688764
commit cc3755a16f
120 changed files with 1258 additions and 1250 deletions

View File

@@ -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.