master
hpp 33 lines 691 Bytes
Raw
1 /*++
2
3 Copyright (c) Microsoft. All rights reserved.
4
5 Module Name:
6
7 hvsocket.hpp
8
9 Abstract:
10
11 This file contains hvsocket helper function declarations.
12
13 --*/
14
15 #pragma once
16
17 #include <hvsocket.h>
18 #include <wil/resource.h>
19
20 namespace wsl::windows::common::hvsocket {
21
22 wil::unique_socket Connect(
23 _In_ const GUID& VmId,
24 _In_ unsigned long Port,
25 _In_opt_ HANDLE ExitHandle = nullptr,
26 ULONG Timeout = 30000, // TODO: Fix
27 const std::source_location& Location = std::source_location::current());
28
29 wil::unique_socket Create();
30
31 wil::unique_socket Listen(_In_ const GUID& VmId, _In_ unsigned long Port, _In_ int Backlog = -1);
32
33 } // namespace wsl::windows::common::hvsocket