Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ BeginReceiveMessageFrom()

IAsyncResult System.Net.Sockets.Socket.BeginReceiveMessageFrom ( byte[] buffer,
int offset,
int size,
SocketFlags socketFlags,
ref EndPoint remoteEP,
AsyncCallback? callback,
object? state )
inline

Definition at line 2602 of file Socket.cs.

2603 {
2604 if (System.Net.NetEventSource.Log.IsEnabled())
2605 {
2606 System.Net.NetEventSource.Info(this, $"size:{size}", "BeginReceiveMessageFrom");
2607 }
2612 if (task.IsCompletedSuccessfully)
2613 {
2614 EndPoint remoteEndPoint = task.Result.RemoteEndPoint;
2615 if (!remoteEP.Equals(remoteEndPoint))
2616 {
2618 }
2619 }
2620 IAsyncResult asyncResult = System.Threading.Tasks.TaskToApm.Begin(task, callback, state);
2621 if (System.Net.NetEventSource.Log.IsEnabled())
2622 {
2623 System.Net.NetEventSource.Info(this, $"size:{size} returning AsyncResult:{asyncResult}", "BeginReceiveMessageFrom");
2624 }
2625 return asyncResult;
2626 }
static readonly System.Net.NetEventSource Log
static void Info(object thisOrContextObject, FormattableString formattableString=null, [CallerMemberName] string memberName=null)
void ValidateReceiveFromEndpointAndState(EndPoint remoteEndPoint, string remoteEndPointArgumentName)
Definition Socket.cs:3757
bool ReceiveMessageFromAsync(SocketAsyncEventArgs e)
Definition Socket.cs:3065
static void ValidateBufferArguments(byte[] buffer, int offset, int size)
Definition Socket.cs:4250
static IAsyncResult Begin(Task task, AsyncCallback callback, object state)
Definition TaskToApm.cs:43

References System.asyncResult, System.Threading.Tasks.TaskToApm.Begin(), System.buffer, System.Net.NetEventSource.Info(), System.Net.NetEventSource.Log, System.offset, System.Net.Sockets.Socket.ReceiveMessageFromAsync(), System.state, System.task, System.Net.Sockets.Socket.ThrowIfDisposed(), System.Net.Sockets.Socket.ValidateBufferArguments(), and System.Net.Sockets.Socket.ValidateReceiveFromEndpointAndState().