Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
L
libzmq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
libzmq
Commits
f6c1c972
Commit
f6c1c972
authored
May 12, 2010
by
Martin Lucina
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:sustrik/zeromq2
parents
52ef3f3f
127cb89a
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
143 additions
and
8 deletions
+143
-8
MAINTAINERS
MAINTAINERS
+60
-0
signaler.cpp
src/signaler.cpp
+1
-0
tcp_connecter.cpp
src/tcp_connecter.cpp
+16
-3
tcp_listener.cpp
src/tcp_listener.cpp
+27
-4
uuid.cpp
src/uuid.cpp
+29
-0
uuid.hpp
src/uuid.hpp
+10
-1
No files found.
MAINTAINERS
0 → 100644
View file @
f6c1c972
Component: Atomic Operations
Maintainer: Martin Lucina
Contact: mato@kotelna.sk
Component: Lock-free Algorithms
Maintainer: Martin Sustrik
Contact: sustrik@250bpm.com
Component: TCP transport
Maintainer: Martin Sustrik
Contact: sustrik@250bpm.com
Component: IPC transport
Maintainer: Martin Sustrik
Contact: sustrik@250bpm.com
Component: PGM transport
Maintainer: Martin Sustrik
Contact: sustrik@250bpm.com
Component: In-process transport
Maintainer: Martin Sustrik
Contact: sustrik@250bpm.com
Component: I/O Threads
Maintainer: Martin Sustrik
Contact: sustrik@250bpm.com
Component: Application Threads and Differnet Socket Types
Maintainer: Martin Sustrik
Contact: sustrik@250bpm.com
Component: Multiplexing (zmq_poll)
Maintainer: Martin Sustrik
Contact: sustrik@250bpm.com
Component: Devices
Maintainer: Martin Sustrik
Contact: sustrik@250bpm.com
Component: Generic Infrastructure (context, signaler, command, pipe)
Maintainer: Martin Sustrik
Contact: sustrik@250bpm.com
Component: Documentation
Maintainer: Martin Lucina
Contact: mato@kotelna.sk
Component: Autotools build system
Maintainer: Martin Lucina
Contact: mato@kotelna.sk
Component: MSVC build system
Maintainer: Martin Sustrik
Contact: sustrik@250bpm.com
Component: Performance tests
Maintainer: Martin Sustrik
Contact: sustrik@250bpm.com
src/signaler.cpp
View file @
f6c1c972
...
...
@@ -25,6 +25,7 @@
#if defined ZMQ_HAVE_OPENVMS
#include <netinet/tcp.h>
#include <unistd.h>
#elif defined ZMQ_HAVE_WINDOWS
#include "windows.hpp"
#else
...
...
src/tcp_connecter.cpp
View file @
f6c1c972
...
...
@@ -140,6 +140,10 @@ zmq::fd_t zmq::tcp_connecter_t::connect ()
#include <netdb.h>
#include <fcntl.h>
#ifdef ZMQ_HAVE_OPENVMS
#include <ioctl.h>
#endif
zmq
::
tcp_connecter_t
::
tcp_connecter_t
()
:
s
(
retired_fd
)
{
...
...
@@ -176,11 +180,17 @@ int zmq::tcp_connecter_t::open ()
return
-
1
;
// Set to non-blocking mode.
int
flags
=
fcntl
(
s
,
F_GETFL
,
0
);
if
(
flags
==
-
1
)
#ifdef ZMQ_HAVE_OPENVMS
int
flags
=
1
;
int
rc
=
ioctl
(
s
,
FIONBIO
,
&
flags
);
errno_assert
(
rc
!=
-
1
);
#else
int
flags
=
fcntl
(
s
,
F_GETFL
,
0
);
if
(
flags
==
-
1
)
flags
=
0
;
int
rc
=
fcntl
(
s
,
F_SETFL
,
flags
|
O_NONBLOCK
);
int
rc
=
fcntl
(
s
,
F_SETFL
,
flags
|
O_NONBLOCK
);
errno_assert
(
rc
!=
-
1
);
#endif
// Disable Nagle's algorithm.
int
flag
=
1
;
...
...
@@ -215,6 +225,8 @@ int zmq::tcp_connecter_t::open ()
errno
=
err
;
return
-
1
;
}
#ifndef ZMQ_HAVE_OPENVMS
else
{
// Create the socket.
...
...
@@ -243,6 +255,7 @@ int zmq::tcp_connecter_t::open ()
errno
=
err
;
return
-
1
;
}
#endif
zmq_assert
(
false
);
return
-
1
;
...
...
src/tcp_listener.cpp
View file @
f6c1c972
...
...
@@ -140,7 +140,14 @@ zmq::fd_t zmq::tcp_listener_t::accept ()
#include <netinet/in.h>
#include <netdb.h>
#include <fcntl.h>
#ifndef ZMQ_HAVE_OPENVMS
#include <sys/un.h>
#endif
#ifdef ZMQ_HAVE_OPENVMS
#include <ioctl.h>
#endif
zmq
::
tcp_listener_t
::
tcp_listener_t
()
:
s
(
retired_fd
)
...
...
@@ -174,11 +181,17 @@ int zmq::tcp_listener_t::set_address (const char *protocol_, const char *addr_)
errno_assert
(
rc
==
0
);
// Set the non-blocking flag.
flag
=
fcntl
(
s
,
F_GETFL
,
0
);
if
(
flag
==
-
1
)
#ifdef ZMQ_HAVE_OPENVMS
flag
=
1
;
rc
=
ioctl
(
s
,
FIONBIO
,
&
flag
);
errno_assert
(
rc
!=
-
1
);
#else
flag
=
fcntl
(
s
,
F_GETFL
,
0
);
if
(
flag
==
-
1
)
flag
=
0
;
rc
=
fcntl
(
s
,
F_SETFL
,
flag
|
O_NONBLOCK
);
rc
=
fcntl
(
s
,
F_SETFL
,
flag
|
O_NONBLOCK
);
errno_assert
(
rc
!=
-
1
);
#endif
// Bind the socket to the network interface and port.
rc
=
bind
(
s
,
(
struct
sockaddr
*
)
&
addr
,
addr_len
);
...
...
@@ -196,6 +209,7 @@ int zmq::tcp_listener_t::set_address (const char *protocol_, const char *addr_)
return
0
;
}
#ifndef ZMQ_HAVE_OPENVMS
else
if
(
strcmp
(
protocol_
,
"ipc"
)
==
0
)
{
// Get rid of the file associated with the UNIX domain socket that
...
...
@@ -235,6 +249,7 @@ int zmq::tcp_listener_t::set_address (const char *protocol_, const char *addr_)
return
0
;
}
#endif
else
{
errno
=
EPROTONOSUPPORT
;
return
-
1
;
...
...
@@ -249,6 +264,7 @@ int zmq::tcp_listener_t::close ()
return
-
1
;
s
=
retired_fd
;
#ifndef ZMQ_HAVE_OPENVMS
// If there's an underlying UNIX domain socket, get rid of the file it
// is associated with.
struct
sockaddr_un
*
su
=
(
struct
sockaddr_un
*
)
&
addr
;
...
...
@@ -257,6 +273,7 @@ int zmq::tcp_listener_t::close ()
if
(
rc
!=
0
)
return
-
1
;
}
#endif
return
0
;
}
...
...
@@ -299,11 +316,17 @@ zmq::fd_t zmq::tcp_listener_t::accept ()
errno_assert
(
sock
!=
-
1
);
// Set to non-blocking mode.
#ifdef ZMQ_HAVE_OPENVMS
int
flags
=
1
;
int
rc
=
ioctl
(
sock
,
FIONBIO
,
&
flags
);
errno_assert
(
rc
!=
-
1
);
#else
int
flags
=
fcntl
(
s
,
F_GETFL
,
0
);
if
(
flags
==
-
1
)
if
(
flags
==
-
1
)
flags
=
0
;
int
rc
=
fcntl
(
sock
,
F_SETFL
,
flags
|
O_NONBLOCK
);
errno_assert
(
rc
!=
-
1
);
#endif
struct
sockaddr
*
sa
=
(
struct
sockaddr
*
)
&
addr
;
if
(
AF_UNIX
!=
sa
->
sa_family
)
{
...
...
src/uuid.cpp
View file @
f6c1c972
...
...
@@ -97,6 +97,35 @@ const char *zmq::uuid_t::to_string ()
return
string_buf
;
}
#elif defined ZMQ_HAVE_OPENVMS
#include <starlet.h>
#define uuid_generate(x) sys$create_uid(&(x))
#define uuid_unparse(x, y) \
sprintf (y, "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x", \
x.data0, x.data1, x.data2, \
x.data3 [0], x.data3 [1], \
x.data3 [2], x.data3 [3], \
x.data3 [4], x.data3 [5], \
x.data3 [6], x.data3 [7]);
zmq
::
uuid_t
::
uuid_t
()
{
uuid_generate
(
uuid
);
uuid_unparse
(
uuid
,
string_buf
);
}
zmq
::
uuid_t
::~
uuid_t
()
{
}
const
char
*
zmq
::
uuid_t
::
to_string
()
{
return
string_buf
;
}
#else
#include <stdio.h>
...
...
src/uuid.hpp
View file @
f6c1c972
...
...
@@ -30,6 +30,14 @@
#include <uuid/uuid.h>
#elif defined ZMQ_HAVE_WINDOWS
#include <rpc.h>
#elif defined ZMQ_HAVE_OPENVMS
typedef
struct
{
unsigned
long
data0
;
unsigned
short
data1
;
unsigned
short
data2
;
unsigned
char
data3
[
8
];
}
uuid_t
;
#endif
namespace
zmq
...
...
@@ -77,7 +85,8 @@ namespace zmq
::
uuid_t
uuid
;
char
*
string_buf
;
#elif defined ZMQ_HAVE_LINUX || defined ZMQ_HAVE_SOLARIS ||\
defined ZMQ_HAVE_OSX || defined ZMQ_HAVE_CYGWIN
defined ZMQ_HAVE_OSX || defined ZMQ_HAVE_CYGWIN ||\
defined ZMQ_HAVE_OPENVMS
::
uuid_t
uuid
;
char
string_buf
[
uuid_string_len
+
1
];
#else
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment