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
193fa1c0
Commit
193fa1c0
authored
Sep 03, 2011
by
Martin Sustrik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Accept square brackets around IPv6 address
Signed-off-by:
Martin Sustrik
<
sustrik@250bpm.com
>
parent
4138aca5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
tcp_address.cpp
src/tcp_address.cpp
+5
-0
No files found.
src/tcp_address.cpp
View file @
193fa1c0
...
...
@@ -373,6 +373,11 @@ int zmq::tcp_address_t::resolve (const char *name_, bool local_, bool ipv4only_)
std
::
string
addr_str
(
name_
,
delimiter
-
name_
);
std
::
string
port_str
(
delimiter
+
1
);
// Remove square brackets around the address, if any.
if
(
!
addr_str
.
empty
()
&&
addr_str
[
0
]
==
'['
&&
addr_str
[
addr_str
.
size
()
-
1
]
==
']'
)
addr_str
=
addr_str
.
substr
(
1
,
addr_str
.
size
()
-
2
);
// Parse the port number (0 is not a valid port).
uint16_t
port
=
(
uint16_t
)
atoi
(
port_str
.
c_str
());
if
(
port
==
0
)
{
...
...
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