Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
SocketException.cs
Go to the documentation of this file.
1
using
System.ComponentModel
;
2
using
System.Runtime.CompilerServices
;
3
using
System.Runtime.InteropServices
;
4
using
System.Runtime.Serialization
;
5
6
namespace
System.Net.Sockets
;
7
8
[
Serializable
]
9
[
TypeForwardedFrom
(
"System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
)]
10
public
class
SocketException
:
Win32Exception
11
{
12
private
readonly
SocketError
_errorCode
;
13
14
public
override
string
Message
=>
base
.Message;
15
16
public
SocketError
SocketErrorCode
=>
_errorCode
;
17
18
public
override
int
ErrorCode
=>
base
.NativeErrorCode;
19
20
public
SocketException
(
int
errorCode
)
21
:
this
((
SocketError
)
errorCode
)
22
{
23
}
24
25
internal
SocketException
(
SocketError
socketError
)
26
:
base
(
GetNativeErrorForSocketError
(
socketError
))
27
{
28
_errorCode
=
socketError
;
29
}
30
31
protected
SocketException
(
SerializationInfo
serializationInfo
,
StreamingContext
streamingContext
)
32
:
base
(
serializationInfo
,
streamingContext
)
33
{
34
if
(
NetEventSource
.
Log
.IsEnabled())
35
{
36
NetEventSource
.
Info
(
this
,
$
"{base.NativeErrorCode}:{Message}"
,
".ctor"
);
37
}
38
}
39
40
public
SocketException
()
41
:
this
(
Marshal
.GetLastPInvokeError())
42
{
43
}
44
45
private
static
int
GetNativeErrorForSocketError
(
SocketError
error
)
46
{
47
return
(
int
)
error
;
48
}
49
}
System.Net.NetEventSource.Log
static readonly System.Net.NetEventSource Log
Definition
NetEventSource.cs:20
System.Net.NetEventSource.Info
static void Info(object thisOrContextObject, FormattableString formattableString=null, [CallerMemberName] string memberName=null)
Definition
NetEventSource.cs:192
System.Net.NetEventSource
Definition
NetEventSource.cs:12
System.Net.Sockets.SocketException.ErrorCode
override int ErrorCode
Definition
SocketException.cs:18
System.Net.Sockets.SocketException.GetNativeErrorForSocketError
static int GetNativeErrorForSocketError(SocketError error)
Definition
SocketException.cs:45
System.Net.Sockets.SocketException.SocketException
SocketException(SocketError socketError)
Definition
SocketException.cs:25
System.Net.Sockets.SocketException.SocketException
SocketException()
Definition
SocketException.cs:40
System.Net.Sockets.SocketException.SocketException
SocketException(SerializationInfo serializationInfo, StreamingContext streamingContext)
Definition
SocketException.cs:31
System.Net.Sockets.SocketException.SocketException
SocketException(int errorCode)
Definition
SocketException.cs:20
System.Net.Sockets.SocketException.Message
override string Message
Definition
SocketException.cs:14
System.Net.Sockets.SocketException.SocketErrorCode
SocketError SocketErrorCode
Definition
SocketException.cs:16
System.Net.Sockets.SocketException._errorCode
readonly SocketError _errorCode
Definition
SocketException.cs:12
System.Net.Sockets.SocketException
Definition
SocketException.cs:11
System.Runtime.InteropServices.Marshal
Definition
Marshal.cs:14
System.Runtime.Serialization.SerializationInfo
Definition
SerializationInfo.cs:7
Win32Exception
System.ComponentModel
Definition
ColumnAttribute.cs:3
System.Data.IsolationLevel.Serializable
@ Serializable
System.Net.Sockets.SocketError
SocketError
Definition
SocketError.cs:4
System.Net.Sockets
Definition
AddressInfoHints.cs:1
System.Runtime.CompilerServices
Definition
NullablePublicOnlyAttribute.cs:3
System.Runtime.InteropServices
Definition
SequenceMarshal.cs:4
System.Runtime.Serialization.CollectionKind.Dictionary
@ Dictionary
System.Runtime.Serialization
Definition
SerializationGuard.cs:3
System.Runtime.Serialization.StreamingContext
Definition
StreamingContext.cs:6
source
System.Net.Primitives
System.Net.Sockets
SocketException.cs
Generated by
1.10.0