dom/network/src/PUDPSocket.ipdl

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     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;
    10 include "mozilla/net/NeckoMessageUtils.h";
    11 include "mozilla/net/DNS.h";
    12 include "prio.h";
    14 using mozilla::net::NetAddr from "mozilla/net/DNS.h";
    15 using struct mozilla::void_t from "ipc/IPCMessageUtils.h";
    17 struct UDPError {
    18   nsCString message;
    19   nsCString filename;
    20   uint32_t lineNumber;
    21   uint32_t columnNumber;
    22 };
    24 struct UDPMessage {
    25   nsCString fromAddr;
    26   uint16_t port;
    27   uint8_t[] data;
    28 };
    30 struct UDPAddressInfo {
    31   nsCString local;
    32   uint16_t port;
    33 };
    35 struct UDPSendResult {
    36   nsresult value;
    37 };
    39 union UDPCallbackData {
    40   void_t;
    41   UDPMessage;
    42   UDPAddressInfo;
    43   UDPSendResult;
    44   UDPError;
    45 };
    47 namespace mozilla {
    48 namespace net {
    50 //-------------------------------------------------------------------
    51 protocol PUDPSocket
    52 {
    53   manager PNecko;
    55 parent:
    56   Data(uint8_t[] data, nsCString remoteAddress, uint16_t port);
    57   DataWithAddress(uint8_t[] data, NetAddr addr);
    58   Close();
    59   RequestDelete();
    61 child:
    62   Callback(nsCString type, UDPCallbackData data, nsCString aState);
    63   __delete__();
    64 };
    67 } // namespace net
    68 } // namespace mozilla

mercurial