SocketAsyncEventArgs.UserToken Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets a user or application object associated with this asynchronous socket operation.
public:
property System::Object ^ UserToken { System::Object ^ get(); void set(System::Object ^ value); };
public object UserToken { get; set; }
public object? UserToken { get; set; }
member this.UserToken : obj with get, set
Public Property UserToken As Object
Property Value
An object that represents the user or application object associated with this asynchronous socket operation.
Remarks
This property can be used by an application to associate an application state object with the SocketAsyncEventArgs object. Primarily, this property is a way for an application to pass state to the application's event handler (for example, the asynchronous operation completion method).
This property is used with all of the asynchronous socket (xxxAsync) methods.
Applies to
See also
- AcceptAsync(SocketAsyncEventArgs)
- ConnectAsync(SocketAsyncEventArgs)
- DisconnectAsync(SocketAsyncEventArgs)
- ReceiveAsync(SocketAsyncEventArgs)
- ReceiveFromAsync(SocketAsyncEventArgs)
- ReceiveMessageFromAsync(SocketAsyncEventArgs)
- SendAsync(SocketAsyncEventArgs)
- SendPacketsAsync(SocketAsyncEventArgs)
- SendToAsync(SocketAsyncEventArgs)
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈