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/dom/network/TCPSocketParent.h";
12 include "mozilla/dom/network/TCPSocketChild.h";
14 using struct mozilla::void_t from "mozilla/ipc/IPCCore.h";
36 //-------------------------------------------------------------------
37 [ManualDealloc, ChildImpl="mozilla::dom::TCPSocketChild", ParentImpl="mozilla::dom::TCPSocketParent"]
43 // Forward calling to child's open() method to parent, expect TCPOptions
44 // is expanded to |useSSL| (from TCPOptions.useSecureTransport) and
45 // |binaryType| (from TCPOption.binaryType).
46 async Open(nsString host, uint16_t port, bool useSSL, bool useArrayBuffers);
48 async Data(SendableData data);
50 // Forward calling to child's upgradeToSecure() method to parent.
53 // Forward calling to child's send() method to parent.
56 // Forward calling to child's resume() method to parent.
59 // Forward calling to child's close() method to parent.
63 // Forward events that are dispatched by parent.
64 async Callback(nsString type, CallbackData data, uint32_t readyState);
66 // Update child's bufferedAmount when parent's bufferedAmount is updated.
67 // trackingNumber is also passed back to child to ensure the bufferedAmount
68 // is corresponding the last call to send().
69 async UpdateBufferedAmount(uint32_t bufferedAmount, uint32_t trackingNumber);
72 async RequestDelete();
78 } // namespace mozilla