1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
3 * You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #include "mozilla/net/PNeckoParent.h"
6 #include "mozilla/net/PTCPServerSocketParent.h"
7 #include "nsITCPSocketParent.h"
8 #include "nsITCPServerSocketParent.h"
9 #include "nsCycleCollectionParticipant.h"
11 #include "nsIDOMTCPSocket.h"
18 class TCPServerSocketParent
: public mozilla::net::PTCPServerSocketParent
19 , public nsITCPServerSocketParent
22 NS_DECL_CYCLE_COLLECTION_CLASS(TCPServerSocketParent
)
23 NS_DECL_CYCLE_COLLECTING_ISUPPORTS
24 NS_DECL_NSITCPSERVERSOCKETPARENT
26 TCPServerSocketParent() : mNeckoParent(nullptr), mIPCOpen(false) {}
28 bool Init(PNeckoParent
* neckoParent
, const uint16_t& aLocalPort
, const uint16_t& aBacklog
,
29 const nsString
& aBinaryType
);
31 virtual bool RecvClose() MOZ_OVERRIDE
;
32 virtual bool RecvRequestDelete() MOZ_OVERRIDE
;
34 void AddIPDLReference();
35 void ReleaseIPDLReference();
38 ~TCPServerSocketParent() {}
40 virtual void ActorDestroy(ActorDestroyReason why
) MOZ_OVERRIDE
;
42 PNeckoParent
* mNeckoParent
;
43 nsCOMPtr
<nsITCPSocketIntermediary
> mIntermediary
;
44 nsCOMPtr
<nsIDOMTCPServerSocket
> mServerSocket
;
49 } // namespace mozilla