1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
5 * You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef mozilla_dom_TCPServerSocketChild_h
8 #define mozilla_dom_TCPServerSocketChild_h
10 #include "mozilla/net/PTCPServerSocketChild.h"
11 #include "nsCycleCollectionParticipant.h"
14 #define TCPSERVERSOCKETCHILD_CID \
16 0x41a77ec8, 0xfd86, 0x409e, { \
17 0xae, 0xa9, 0xaf, 0x2c, 0xa4, 0x07, 0xef, 0x8e \
21 class nsITCPServerSocketInternal
;
23 namespace mozilla::dom
{
25 class TCPServerSocket
;
27 class TCPServerSocketChildBase
: public nsISupports
{
29 NS_DECL_CYCLE_COLLECTION_CLASS(TCPServerSocketChildBase
)
30 NS_DECL_CYCLE_COLLECTING_ISUPPORTS
32 void AddIPDLReference();
33 void ReleaseIPDLReference();
36 TCPServerSocketChildBase();
37 virtual ~TCPServerSocketChildBase();
39 RefPtr
<TCPServerSocket
> mServerSocket
;
43 class TCPServerSocketChild
: public mozilla::net::PTCPServerSocketChild
,
44 public TCPServerSocketChildBase
{
46 NS_IMETHOD_(MozExternalRefCountType
) Release() override
;
48 TCPServerSocketChild(TCPServerSocket
* aServerSocket
, uint16_t aLocalPort
,
49 uint16_t aBacklog
, bool aUseArrayBuffers
);
50 ~TCPServerSocketChild();
54 mozilla::ipc::IPCResult
RecvCallbackAccept(PTCPSocketChild
* socket
);
57 } // namespace mozilla::dom
59 #endif // mozilla_dom_TCPServerSocketChild_h