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
fae3a4e0
Commit
fae3a4e0
authored
Apr 21, 2016
by
Constantin Rack
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1911 from somdoron/FixUDPWindows
parents
bf50f9fe
87e455f5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
8 deletions
+19
-8
select.cpp
src/select.cpp
+19
-8
No files found.
src/select.cpp
View file @
fae3a4e0
...
...
@@ -439,14 +439,25 @@ u_short zmq::select_t::get_fd_family (fd_t fd_)
sockaddr_storage
addr
=
{
0
};
int
addr_size
=
sizeof
addr
;
int
rc
=
getsockname
(
fd_
,
(
sockaddr
*
)
&
addr
,
&
addr_size
);
// AF_INET and AF_INET6 can be mixed in select
// TODO: If proven otherwise, should simply return addr.sa_family
if
(
rc
!=
SOCKET_ERROR
)
return
addr
.
ss_family
==
AF_INET6
?
AF_INET
:
addr
.
ss_family
;
else
return
AF_UNSPEC
;
int
type
;
int
type_length
=
sizeof
(
int
);
int
rc
=
getsockopt
(
fd_
,
SOL_SOCKET
,
SO_TYPE
,
(
char
*
)
&
type
,
&
type_length
);
if
(
rc
==
0
)
{
if
(
type
==
SOCK_DGRAM
)
return
AF_INET
;
else
{
rc
=
getsockname
(
fd_
,
(
sockaddr
*
)
&
addr
,
&
addr_size
);
// AF_INET and AF_INET6 can be mixed in select
// TODO: If proven otherwise, should simply return addr.sa_family
if
(
rc
!=
SOCKET_ERROR
)
return
addr
.
ss_family
==
AF_INET6
?
AF_INET
:
addr
.
ss_family
;
}
}
return
AF_UNSPEC
;
}
zmq
::
select_t
::
family_entry_t
::
family_entry_t
()
:
...
...
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