socket 问题请教
private void StartSend(SocketAsyncEventArgs args)
{
Socket socket = args.UserToken as Socket;
// 上面这句话是啥意思?
if(!socket.SendToAsync(args))
{
ProcessSent(args);
}
}
------解决方案--------------------UserToken= Gets or sets a user or application object associated with this asynchronous socket operation.
as
as:用于检查在兼容的引用类型之间执行某些类型的转换。
socket不明白请百度c# SOCKET
UserToken as socket
你哪里不明白?