protected bool OnSendAsync(SocketAsyncEventArgs iSocketAsyncEventArgs) { AsyncUserToken oSocketToken = iSocketAsyncEventArgs.UserToken as AsyncUserToken; oSocketToken.ActiveDateTime = DateTime.Now; if (iSocketAsyncEventArgs.SocketError == SocketError.Success) { return(oSocketToken.SendAsyncCompleted()); //调用子类回调函数 } else { CloseSocket(oSocketToken); return(false); } }