C# Class J9Updater.FileTransferSvc.Ver1.Sender

消息发送器
显示文件 Open project: zlphoenix/LearnCSharp

Public Methods

Method Description
Send ( Message msg, Action callback ) : void

发送消息

Send ( Stream stream, Action callback ) : void

发送数据流

Sender ( TransmitConfig config ) : J9Updater.FileTransferSvc.Ver1.Msgs

通过一个Config初始化Sender

Private Methods

Method Description
AfterReadStream ( IAsyncResult ar ) : void
AfterSendCallBack ( IAsyncResult ar ) : void
SendStreamCallBack ( IAsyncResult ar ) : void

Method Details

Send() public method

发送消息
public Send ( Message msg, Action callback ) : void
msg J9Updater.FileTransferSvc.Ver1.Msgs.Message 消息内容,通过序列化为字节流
callback Action
return void

Send() public method

发送数据流
public Send ( Stream stream, Action callback ) : void
stream Stream
callback Action
return void

Sender() public method

通过一个Config初始化Sender
public Sender ( TransmitConfig config ) : J9Updater.FileTransferSvc.Ver1.Msgs
config TransmitConfig
return J9Updater.FileTransferSvc.Ver1.Msgs