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
8ba097f3
Commit
8ba097f3
authored
Nov 23, 2012
by
Pieter Hintjens
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test cases were failing on bind
parent
c1f76e43
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
test_connect_delay.cpp
tests/test_connect_delay.cpp
+1
-1
test_raw_sock.cpp
tests/test_raw_sock.cpp
+4
-4
No files found.
tests/test_connect_delay.cpp
View file @
8ba097f3
...
...
@@ -53,7 +53,7 @@ int main (void)
val
=
0
;
rc
=
zmq_setsockopt
(
to
,
ZMQ_LINGER
,
&
val
,
sizeof
(
val
));
assert
(
rc
==
0
);
rc
=
zmq_bind
(
to
,
"tcp://*:
5
555"
);
rc
=
zmq_bind
(
to
,
"tcp://*:
6
555"
);
assert
(
rc
==
0
);
// Create a socket pushing to two endpoints - only 1 message should arrive.
...
...
tests/test_raw_sock.cpp
View file @
8ba097f3
...
...
@@ -42,7 +42,7 @@ int tcp_client ()
struct
sockaddr_in
serv_addr
;
struct
hostent
*
server
;
const
int
portno
=
5
555
;
const
int
portno
=
7
555
;
int
sockfd
=
socket
(
AF_INET
,
SOCK_STREAM
,
0
);
assert
(
sockfd
>=
0
);
...
...
@@ -77,7 +77,7 @@ int tcp_server ()
memset
(
&
serv_addr
,
0
,
sizeof
serv_addr
);
serv_addr
.
sin_family
=
AF_INET
;
serv_addr
.
sin_addr
.
s_addr
=
htonl
(
INADDR_ANY
);
serv_addr
.
sin_port
=
htons
(
5
555
);
serv_addr
.
sin_port
=
htons
(
7
555
);
rc
=
bind
(
listenfd
,
(
struct
sockaddr
*
)
&
serv_addr
,
sizeof
serv_addr
);
assert
(
rc
==
0
);
...
...
@@ -165,7 +165,7 @@ void test_zmq_connect ()
rc
=
zmq_setsockopt
(
zs
,
ZMQ_ROUTER_RAW
,
&
raw_sock
,
sizeof
raw_sock
);
assert
(
rc
==
0
);
rc
=
zmq_connect
(
zs
,
"tcp://127.0.0.1:
5
555"
);
rc
=
zmq_connect
(
zs
,
"tcp://127.0.0.1:
7
555"
);
assert
(
rc
==
0
);
int
i
;
...
...
@@ -213,7 +213,7 @@ int main ()
int
raw_sock
=
1
;
int
rc
=
zmq_setsockopt
(
sb
,
ZMQ_ROUTER_RAW
,
&
raw_sock
,
sizeof
raw_sock
);
assert
(
rc
==
0
);
rc
=
zmq_bind
(
sb
,
"tcp://127.0.0.1:
5
555"
);
rc
=
zmq_bind
(
sb
,
"tcp://127.0.0.1:
7
555"
);
assert
(
rc
==
0
);
int
sock_fd
=
tcp_client
();
...
...
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