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_TCPServerSocketParent_h
8 #define mozilla_dom_TCPServerSocketParent_h
10 #include "mozilla/net/PNeckoParent.h"
11 #include "mozilla/net/PTCPServerSocketParent.h"
12 #include "nsCycleCollectionParticipant.h"
18 class TCPServerSocket
;
19 class TCPServerSocketEvent
;
20 class TCPSocketParent
;
22 class TCPServerSocketParent
: public mozilla::net::PTCPServerSocketParent
,
25 NS_DECL_CYCLE_COLLECTION_CLASS(TCPServerSocketParent
)
26 NS_DECL_CYCLE_COLLECTING_ISUPPORTS
28 TCPServerSocketParent(PNeckoParent
* neckoParent
, uint16_t aLocalPort
,
29 uint16_t aBacklog
, bool aUseArrayBuffers
);
33 mozilla::ipc::IPCResult
RecvClose();
34 mozilla::ipc::IPCResult
RecvRequestDelete();
36 void AddIPDLReference();
37 void ReleaseIPDLReference();
39 void OnConnect(TCPServerSocketEvent
* event
);
42 ~TCPServerSocketParent();
44 nsresult
SendCallbackAccept(TCPSocketParent
* socket
);
46 virtual void ActorDestroy(ActorDestroyReason why
) override
;
48 PNeckoParent
* mNeckoParent
;
49 RefPtr
<TCPServerSocket
> mServerSocket
;
54 } // namespace mozilla
56 #endif // mozilla_dom_TCPServerSocketParent_h