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;
13 include "mozilla/net/NeckoMessageUtils.h";
14 include "mozilla/net/DNS.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 {
40 //-------------------------------------------------------------------
41 [ManualDealloc, ChildImpl="mozilla::dom::UDPSocketChild", ParentImpl="mozilla::dom::UDPSocketParent"]
44 manager PNecko or PBackground;
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);
58 async RequestDelete();
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);
71 } // namespace mozilla