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
15f9ee19
Commit
15f9ee19
authored
Jun 23, 2015
by
Constantin Rack
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Solution: allow brackets in tcp ipv6 address
parent
d33fb6a2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
socket_base.cpp
src/socket_base.cpp
+3
-2
test_connect_resolve.cpp
tests/test_connect_resolve.cpp
+4
-1
No files found.
src/socket_base.cpp
View file @
15f9ee19
...
...
@@ -717,11 +717,12 @@ int zmq::socket_base_t::connect (const char *addr_)
// Following code is quick and dirty check to catch obvious errors,
// without trying to be fully accurate.
const
char
*
check
=
address
.
c_str
();
if
(
isalnum
(
*
check
)
||
isxdigit
(
*
check
))
{
if
(
isalnum
(
*
check
)
||
isxdigit
(
*
check
)
||
*
check
==
'['
)
{
check
++
;
while
(
isalnum
(
*
check
)
||
isxdigit
(
*
check
)
||
*
check
==
'.'
||
*
check
==
'-'
||
*
check
==
':'
||
*
check
==
';'
)
||
*
check
==
'.'
||
*
check
==
'-'
||
*
check
==
':'
||
*
check
==
';'
||
*
check
==
']'
)
check
++
;
}
// Assume the worst, now look for success
...
...
tests/test_connect_resolve.cpp
View file @
15f9ee19
...
...
@@ -40,7 +40,10 @@ int main (void)
int
rc
=
zmq_connect
(
sock
,
"tcp://localhost:1234"
);
assert
(
rc
==
0
);
rc
=
zmq_connect
(
sock
,
"tcp://[::1]:1234"
);
assert
(
rc
==
0
);
rc
=
zmq_connect
(
sock
,
"tcp://localhost:invalid"
);
assert
(
rc
==
-
1
);
...
...
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