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

Unified Diff: mojo/services/public/interfaces/network/udp_socket.mojom

Issue 596383002: Mojo UDP API implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@udp_interface
Patch Set: Created 6 years, 3 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
« no previous file with comments | « mojo/services/public/interfaces/network/network_service.mojom ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/services/public/interfaces/network/udp_socket.mojom
diff --git a/mojo/services/public/interfaces/network/udp_socket.mojom b/mojo/services/public/interfaces/network/udp_socket.mojom
index 6f0cff3efe324a30aa8abca656222b3915c3b920..33e4118e5af8203a5993dba7fa5139ccbc861272 100644
--- a/mojo/services/public/interfaces/network/udp_socket.mojom
+++ b/mojo/services/public/interfaces/network/udp_socket.mojom
@@ -63,11 +63,18 @@ interface UDPSocket {
SendToAndForget(NetAddress addr, uint8[] data);
// Sends data to the specified destination. The socket must be bound.
+ // On success, |result.code| is a non-negative number indicating how many
+ // bytes have been written. Otherwise, it is a network error code, including
+ // (but not limited to):
+ // - ERR_INSUFFICIENT_RESOURCES (-12): The service doesn't have sufficient
+ // resource to complete the operation. One possible cause is that the client
+ // tries to send too many packets in a short period of time.
SendTo(NetAddress addr, uint8[] data) => (NetworkError result);
};
interface UDPSocketClient {
- // |addr| and |data| are non-NULL on success.
+ // On success, |addr| and |data| are non-NULL, |result.code| is a non-negative
+ // number indicating how many bytes have been received.
OnReceived(NetworkError result, NetAddress? addr, uint8[]? data);
};
« no previous file with comments | « mojo/services/public/interfaces/network/network_service.mojom ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698