master
h 38 lines 785 Bytes
Raw
1 /*++
2
3 Copyright (c) Microsoft. All rights reserved.
4
5 Module Name:
6
7 LxssServerPort.h
8
9 Abstract:
10
11 This file contains declarations for the server port wrapper class.
12
13 --*/
14
15 #pragma once
16
17 class LxssMessagePort;
18
19 class LxssServerPort
20 {
21 public:
22 LxssServerPort();
23
24 LxssServerPort(_In_ wil::unique_handle&& ServerPortHandle);
25
26 void RegisterLxBusServer(_In_ const wil::unique_handle& InstanceHandle, _In_ LPCSTR ServerName);
27
28 HANDLE
29 ReleaseServerPort();
30
31 std::unique_ptr<LxssMessagePort> WaitForConnection(_In_ ULONG TimeoutMs = LXBUS_IPC_INFINITE_TIMEOUT);
32
33 NTSTATUS
34 WaitForConnectionNoThrow(_Out_ std::unique_ptr<LxssMessagePort>* MessagePort, _In_ ULONG TimeoutMs = LXBUS_IPC_INFINITE_TIMEOUT) const;
35
36 private:
37 wil::unique_handle m_serverPort;
38 };