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
77f5344f
Commit
77f5344f
authored
Jan 22, 2016
by
Ilya Kulakov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix VMCI compilation errors on Windows.
parent
6c997477
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
13 deletions
+23
-13
vmci_connecter.cpp
src/vmci_connecter.cpp
+10
-6
vmci_connecter.hpp
src/vmci_connecter.hpp
+1
-1
vmci_listener.cpp
src/vmci_listener.cpp
+11
-5
vmci_listener.hpp
src/vmci_listener.hpp
+1
-1
No files found.
src/vmci_connecter.cpp
View file @
77f5344f
...
...
@@ -41,8 +41,8 @@
#include "err.hpp"
#include "ip.hpp"
#include "address.hpp"
#include "ipc_address.hpp"
#include "session_base.hpp"
#include "vmci_address.hpp"
#include "vmci.hpp"
zmq
::
vmci_connecter_t
::
vmci_connecter_t
(
class
io_thread_t
*
io_thread_
,
...
...
@@ -226,8 +226,8 @@ int zmq::vmci_connecter_t::open ()
// Connect to the remote peer.
int
rc
=
::
connect
(
s
,
addr
->
resolved
.
ipc
_addr
->
addr
(),
addr
->
resolved
.
ipc
_addr
->
addrlen
());
s
,
addr
->
resolved
.
vmci
_addr
->
addr
(),
addr
->
resolved
.
vmci
_addr
->
addrlen
());
// Connect was successful immediately.
if
(
rc
==
0
)
...
...
@@ -244,14 +244,18 @@ int zmq::vmci_connecter_t::open ()
return
-
1
;
}
int
zmq
::
vmci_connecter_t
::
close
()
void
zmq
::
vmci_connecter_t
::
close
()
{
zmq_assert
(
s
!=
retired_fd
);
int
rc
=
::
close
(
s
);
#ifdef ZMQ_HAVE_WINDOWS
const
int
rc
=
closesocket
(
s
);
wsa_assert
(
rc
!=
SOCKET_ERROR
);
#else
const
int
rc
=
::
close
(
s
);
errno_assert
(
rc
==
0
);
#endif
socket
->
event_closed
(
endpoint
,
s
);
s
=
retired_fd
;
return
0
;
}
zmq
::
fd_t
zmq
::
vmci_connecter_t
::
connect
()
...
...
src/vmci_connecter.hpp
View file @
77f5344f
...
...
@@ -88,7 +88,7 @@ namespace zmq
int
open
();
// Close the connecting socket.
int
close
();
void
close
();
// Get the file descriptor of newly created connection. Returns
// retired_fd if the connection was unsuccessful.
...
...
src/vmci_listener.cpp
View file @
77f5344f
...
...
@@ -45,8 +45,12 @@
#include "socket_base.hpp"
#include "vmci.hpp"
#if defined ZMQ_HAVE_WINDOWS
#include "windows.hpp"
#else
#include <unistd.h>
#include <fcntl.h>
#endif
zmq
::
vmci_listener_t
::
vmci_listener_t
(
io_thread_t
*
io_thread_
,
socket_base_t
*
socket_
,
const
options_t
&
options_
)
:
...
...
@@ -174,16 +178,18 @@ int zmq::vmci_listener_t::set_address (const char *addr_)
return
-
1
;
}
int
zmq
::
vmci_listener_t
::
close
()
void
zmq
::
vmci_listener_t
::
close
()
{
zmq_assert
(
s
!=
retired_fd
);
#ifdef ZMQ_HAVE_WINDOWS
int
rc
=
closesocket
(
s
);
wsa_assert
(
rc
!=
SOCKET_ERROR
);
#else
int
rc
=
::
close
(
s
);
errno_assert
(
rc
==
0
);
s
=
retired_fd
;
#endif
socket
->
event_closed
(
endpoint
,
s
);
return
0
;
s
=
retired_fd
;
}
zmq
::
fd_t
zmq
::
vmci_listener_t
::
accept
()
...
...
src/vmci_listener.hpp
View file @
77f5344f
...
...
@@ -71,7 +71,7 @@ namespace zmq
void
in_event
();
// Close the listening socket.
int
close
();
void
close
();
// Accept the new connection. Returns the file descriptor of the
// newly created connection. The function may return retired_fd
...
...
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