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
aff14067
Commit
aff14067
authored
Jan 08, 2013
by
Pieter Hintjens
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Test cases were failing on bind"
This reverts commit
8ba097f3
.
parent
a4bedc52
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
test_raw_sock.cpp
tests/test_raw_sock.cpp
+4
-4
No files found.
tests/test_raw_sock.cpp
View file @
aff14067
...
...
@@ -42,7 +42,7 @@ int tcp_client ()
struct
sockaddr_in
serv_addr
;
struct
hostent
*
server
;
const
int
portno
=
7
555
;
const
int
portno
=
5
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
(
7
555
);
serv_addr
.
sin_port
=
htons
(
5
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:
7
555"
);
rc
=
zmq_connect
(
zs
,
"tcp://127.0.0.1:
5
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:
7
555"
);
rc
=
zmq_bind
(
sb
,
"tcp://127.0.0.1:
5
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