Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
SafeMsQuicStreamHandle.cs
Go to the documentation of this file.
1
using
System.Runtime.InteropServices
;
2
3
namespace
System.Net.Quic.Implementations.MsQuic.Internal
;
4
5
internal
sealed
class
SafeMsQuicStreamHandle
:
SafeHandle
6
{
7
public
override
bool
IsInvalid
=>
handle
==
IntPtr
.
Zero
;
8
9
public
SafeMsQuicStreamHandle
()
10
: base(
IntPtr
.Zero, ownsHandle: true)
11
{
12
}
13
14
public
SafeMsQuicStreamHandle
(
IntPtr
streamHandle)
15
: this()
16
{
17
SetHandle
(streamHandle);
18
}
19
20
protected
override
bool
ReleaseHandle
()
21
{
22
MsQuicApi
.
Api
.StreamCloseDelegate(
handle
);
23
SetHandle
(
IntPtr
.
Zero
);
24
return
true
;
25
}
26
}
System.Net.Quic.Implementations.MsQuic.Internal.MsQuicApi.Api
static MsQuicApi Api
Definition
MsQuicApi.cs:13
System.Net.Quic.Implementations.MsQuic.Internal.MsQuicApi
Definition
MsQuicApi.cs:8
System.Net.Quic.Implementations.MsQuic.Internal.SafeMsQuicStreamHandle.SafeMsQuicStreamHandle
SafeMsQuicStreamHandle()
Definition
SafeMsQuicStreamHandle.cs:9
System.Net.Quic.Implementations.MsQuic.Internal.SafeMsQuicStreamHandle.ReleaseHandle
override bool ReleaseHandle()
Definition
SafeMsQuicStreamHandle.cs:20
System.Net.Quic.Implementations.MsQuic.Internal.SafeMsQuicStreamHandle.IsInvalid
override bool IsInvalid
Definition
SafeMsQuicStreamHandle.cs:7
System.Net.Quic.Implementations.MsQuic.Internal.SafeMsQuicStreamHandle.SafeMsQuicStreamHandle
SafeMsQuicStreamHandle(IntPtr streamHandle)
Definition
SafeMsQuicStreamHandle.cs:14
System.Net.Quic.Implementations.MsQuic.Internal.SafeMsQuicStreamHandle
Definition
SafeMsQuicStreamHandle.cs:6
System.Runtime.InteropServices.SafeHandle.SetHandle
void SetHandle(IntPtr handle)
Definition
SafeHandle.cs:42
System.Runtime.InteropServices.SafeHandle.handle
IntPtr handle
Definition
SafeHandle.cs:8
System.Runtime.InteropServices.SafeHandle
Definition
SafeHandle.cs:7
System.Net.Quic.Implementations.MsQuic.Internal
Definition
MsQuicAddressHelpers.cs:4
System.Runtime.InteropServices
Definition
SequenceMarshal.cs:4
System.IntPtr.Zero
static readonly IntPtr Zero
Definition
IntPtr.cs:18
System.IntPtr
Definition
IntPtr.cs:14
source
System.Net.Quic
System.Net.Quic.Implementations.MsQuic.Internal
SafeMsQuicStreamHandle.cs
Generated by
1.10.0