| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "network/public/cpp/udp_socket_wrapper.h" | 5 #include "network/public/cpp/udp_socket_wrapper.h" |
| 6 | 6 |
| 7 #include <assert.h> | 7 #include <assert.h> |
| 8 | 8 |
| 9 #include "mojo/public/cpp/environment/logging.h" | 9 #include "mojo/public/cpp/environment/logging.h" |
| 10 | 10 |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 void UDPSocketWrapper::AllowAddressReuse(const ErrorCallback& callback) { | 78 void UDPSocketWrapper::AllowAddressReuse(const ErrorCallback& callback) { |
| 79 socket_->AllowAddressReuse(callback); | 79 socket_->AllowAddressReuse(callback); |
| 80 } | 80 } |
| 81 | 81 |
| 82 void UDPSocketWrapper::Bind( | 82 void UDPSocketWrapper::Bind( |
| 83 NetAddressPtr addr, | 83 NetAddressPtr addr, |
| 84 const Callback<void(NetworkErrorPtr, NetAddressPtr)>& callback) { | 84 const Callback<void(NetworkErrorPtr, NetAddressPtr)>& callback) { |
| 85 socket_->Bind(addr.Pass(), callback); | 85 socket_->Bind(addr.Pass(), callback); |
| 86 } | 86 } |
| 87 | 87 |
| 88 void UDPSocketWrapper::Connect( |
| 89 NetAddressPtr remote_addr, |
| 90 const Callback<void(NetworkErrorPtr, NetAddressPtr)>& callback) { |
| 91 socket_->Connect(remote_addr.Pass(), callback); |
| 92 } |
| 93 |
| 88 void UDPSocketWrapper::SetSendBufferSize(uint32_t size, | 94 void UDPSocketWrapper::SetSendBufferSize(uint32_t size, |
| 89 const ErrorCallback& callback) { | 95 const ErrorCallback& callback) { |
| 90 socket_->SetSendBufferSize(size, callback); | 96 socket_->SetSendBufferSize(size, callback); |
| 91 } | 97 } |
| 92 | 98 |
| 93 void UDPSocketWrapper::SetReceiveBufferSize(uint32_t size, | 99 void UDPSocketWrapper::SetReceiveBufferSize(uint32_t size, |
| 94 const ErrorCallback& callback) { | 100 const ErrorCallback& callback) { |
| 95 socket_->SetReceiveBufferSize(size, callback); | 101 socket_->SetReceiveBufferSize(size, callback); |
| 96 } | 102 } |
| 97 | 103 |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 request->dest_addr.Pass(), request->data.Pass(), | 204 request->dest_addr.Pass(), request->data.Pass(), |
| 199 ErrorCallback(static_cast<ErrorCallback::Runnable*>( | 205 ErrorCallback(static_cast<ErrorCallback::Runnable*>( |
| 200 new SendCallbackHandler(this, request->callback)))); | 206 new SendCallbackHandler(this, request->callback)))); |
| 201 | 207 |
| 202 delete request; | 208 delete request; |
| 203 | 209 |
| 204 return true; | 210 return true; |
| 205 } | 211 } |
| 206 | 212 |
| 207 } // namespace mojo | 213 } // namespace mojo |
| OLD | NEW |