2
Copyright (c) 2011 250bpm s.r.o.
3
Copyright (c) 2011 Other contributors as noted in the AUTHORS file
5
This file is part of 0MQ.
7
0MQ is free software; you can redistribute it and/or modify it under
8
the terms of the GNU Lesser General Public License as published by
9
the Free Software Foundation; either version 3 of the License, or
10
(at your option) any later version.
12
0MQ is distributed in the hope that it will be useful,
13
but WITHOUT ANY WARRANTY; without even the implied warranty of
14
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
GNU Lesser General Public License for more details.
17
You should have received a copy of the GNU Lesser General Public License
18
along with this program. If not, see <http://www.gnu.org/licenses/>.
21
#include "ipc_address.hpp"
23
#if !defined ZMQ_HAVE_WINDOWS && !defined ZMQ_HAVE_OPENVMS
29
zmq::ipc_address_t::ipc_address_t ()
31
memset (&address, 0, sizeof (address));
34
zmq::ipc_address_t::~ipc_address_t ()
38
int zmq::ipc_address_t::resolve (const char *path_)
40
if (strlen (path_) >= sizeof (address.sun_path)) {
45
address.sun_family = AF_UNIX;
46
strcpy (address.sun_path, path_);
50
sockaddr *zmq::ipc_address_t::addr ()
52
return (sockaddr*) &address;
55
socklen_t zmq::ipc_address_t::addrlen ()
57
return (socklen_t) sizeof (address);