Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
Kea
Commits
cb5276a2
Commit
cb5276a2
authored
Apr 06, 2018
by
Marcin Siodelski
Browse files
[master] Merge branch 'trac5580'
parents
5d0f9963
9b44014d
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/lib/asiolink/unix_domain_socket.cc
View file @
cb5276a2
// Copyright (C) 2017 Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2017
-2018
Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
...
...
@@ -6,6 +6,7 @@
#include <asiolink/asio_wrapper.h>
#include <asiolink/unix_domain_socket.h>
#include <boost/bind.hpp>
#include <boost/enable_shared_from_this.hpp>
#include <iostream>
using
namespace
boost
::
asio
::
local
;
...
...
@@ -161,11 +162,8 @@ public:
void
UnixDomainSocketImpl
::
asyncConnect
(
const
stream_protocol
::
endpoint
&
endpoint
,
const
UnixDomainSocket
::
ConnectHandler
&
handler
)
{
using
namespace
std
::
placeholders
;
UnixDomainSocket
::
ConnectHandler
local_handler
=
std
::
bind
(
&
UnixDomainSocketImpl
::
connectHandler
,
shared_from_this
(),
handler
,
_1
);
auto
local_handler
=
boost
::
bind
(
&
UnixDomainSocketImpl
::
connectHandler
,
shared_from_this
(),
handler
,
_1
);
socket_
.
async_connect
(
endpoint
,
local_handler
);
}
...
...
@@ -193,11 +191,8 @@ UnixDomainSocketImpl::asyncSend(const void* data, const size_t length,
void
UnixDomainSocketImpl
::
doSend
(
const
boost
::
asio
::
const_buffers_1
&
buffer
,
const
UnixDomainSocket
::
Handler
&
handler
)
{
using
namespace
std
::
placeholders
;
UnixDomainSocket
::
Handler
local_handler
=
std
::
bind
(
&
UnixDomainSocketImpl
::
sendHandler
,
shared_from_this
(),
handler
,
buffer
,
_1
,
_2
);
auto
local_handler
=
boost
::
bind
(
&
UnixDomainSocketImpl
::
sendHandler
,
shared_from_this
(),
handler
,
buffer
,
_1
,
_2
);
socket_
.
async_send
(
buffer
,
local_handler
);
}
...
...
@@ -228,11 +223,8 @@ UnixDomainSocketImpl::asyncReceive(void* data, const size_t length,
void
UnixDomainSocketImpl
::
doReceive
(
const
boost
::
asio
::
mutable_buffers_1
&
buffer
,
const
UnixDomainSocket
::
Handler
&
handler
)
{
using
namespace
std
::
placeholders
;
UnixDomainSocket
::
Handler
local_handler
=
std
::
bind
(
&
UnixDomainSocketImpl
::
receiveHandler
,
shared_from_this
(),
handler
,
buffer
,
_1
,
_2
);
auto
local_handler
=
boost
::
bind
(
&
UnixDomainSocketImpl
::
receiveHandler
,
shared_from_this
(),
handler
,
buffer
,
_1
,
_2
);
socket_
.
async_receive
(
buffer
,
0
,
local_handler
);
}
...
...
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