Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(286)

Unified Diff: mojo/services/network/public/cpp/udp_socket_wrapper.h

Issue 863253002: Update from https://crrev.com/312600 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: mojo/services/network/public/cpp/udp_socket_wrapper.h
diff --git a/mojo/services/network/public/cpp/udp_socket_wrapper.h b/mojo/services/network/public/cpp/udp_socket_wrapper.h
index 32204d7cb3fe4764ab9115eccaa95ec62096575c..650f98e411cd5d1e21decd658e2188799f8fdf2c 100644
--- a/mojo/services/network/public/cpp/udp_socket_wrapper.h
+++ b/mojo/services/network/public/cpp/udp_socket_wrapper.h
@@ -43,6 +43,9 @@ class UDPSocketWrapper : public UDPSocketClient {
void Bind(NetAddressPtr addr,
const Callback<void(NetworkErrorPtr, NetAddressPtr)>& callback);
+ void Connect(NetAddressPtr remote_addr,
+ const Callback<void(NetworkErrorPtr, NetAddressPtr)>& callback);
+
void SetSendBufferSize(uint32_t size, const ErrorCallback& callback);
void SetReceiveBufferSize(uint32_t size, const ErrorCallback& callback);
@@ -51,10 +54,13 @@ class UDPSocketWrapper : public UDPSocketClient {
// |callback| before it returns, and the return value is set to true.
// Otherwise, the return value is set to false and the callback will be run
// asynchronously.
+ // If the socket is connected, the net address pointer passed into the
+ // callback is set to null.
bool ReceiveFrom(const ReceiveCallback& callback);
// This method is aware of the max pending send requests allowed by the
// service, and caches send requests locally if necessary.
+ // |dest_addr| is allowed to be null if the socket is connected.
void SendTo(NetAddressPtr dest_addr,
Array<uint8_t> data,
const ErrorCallback& callback);

Powered by Google App Engine
This is Rietveld 408576698