Backed out 2 changesets (bug 1908320) for causing wr failures on align-items-baseline...
[gecko.git] / dom / network / PUDPSocket.ipdl
blobcc5a1729f3652c5c70980d9e115c5685a432bcf9
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set sw=2 ts=8 et tw=80 ft=cpp : */
4 /* This Source Code Form is subject to the terms of the Mozilla Public
5  * License, v. 2.0. If a copy of the MPL was not distributed with this
6  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
8 include protocol PNecko;
9 include protocol PBackground;
11 include IPCStream;
13 include "mozilla/net/NeckoMessageUtils.h";
14 include "mozilla/net/DNS.h";
15 include "prio.h";
16 include "mozilla/dom/network/UDPSocketParent.h";
17 include "mozilla/dom/network/UDPSocketChild.h";
19 using mozilla::net::NetAddr from "mozilla/net/DNS.h";
20 using struct mozilla::void_t from "mozilla/ipc/IPCCore.h";
22 struct UDPAddressInfo {
23   nsCString addr;
24   uint16_t port;
27 union UDPSocketAddr {
28   UDPAddressInfo;
29   NetAddr;
32 union UDPData {
33   uint8_t[];
34   IPCStream;
37 namespace mozilla {
38 namespace net {
40 //-------------------------------------------------------------------
41 [ManualDealloc, ChildImpl="mozilla::dom::UDPSocketChild", ParentImpl="mozilla::dom::UDPSocketParent"]
42 protocol PUDPSocket
44   manager PNecko or PBackground;
46 parent:
47   async Bind(UDPAddressInfo addressInfo, bool addressReuse, bool loopback,
48              uint32_t recvBufferSize, uint32_t sendBufferSize);
49   async Connect(UDPAddressInfo addressInfo);
51   async OutgoingData(UDPData data, UDPSocketAddr addr);
53   async JoinMulticast(nsCString multicastAddress, nsCString iface);
54   async LeaveMulticast(nsCString multicastAddress, nsCString iface);
56   async Close();
58   async RequestDelete();
60 child:
61   async CallbackOpened(UDPAddressInfo addressInfo);
62   async CallbackConnected(UDPAddressInfo addressInfo);
63   async CallbackClosed();
64   async CallbackReceivedData(UDPAddressInfo addressInfo, uint8_t[] data);
65   async CallbackError(nsCString message, nsCString filename, uint32_t lineNumber);
66   async __delete__();
70 } // namespace net
71 } // namespace mozilla