示例#1
0
文件: TestServer.cs 项目: m9ra/Hipiol
        private void _dataReceived(DataReceivedController controller, Block block)
        {
            ReceivedBytesCount += controller.ReceivedBytes;

            _serverController.DataReceived(controller, block);
        }
示例#2
0
 internal override void DataReceived(DataReceivedController controller, Block block)
 {
     var client = controller.ClientTag as ServerClient;
     client.ReportData(controller.ReceivedBytes);
 }
示例#3
0
文件: IOPool.cs 项目: m9ra/Hipiol
 /// <summary>
 /// Handle client that has received data.
 /// </summary>
 /// <param name="controller">Controller of the client.</param>
 internal void Report_DataReceive(DataReceivedController controller)
 {
     _dataReceivedHandler(controller, controller.ReceivedBlock);
 }
示例#4
0
 internal virtual void DataReceived(DataReceivedController controller, Block block)
 {
     //by default we do nothing
 }
示例#5
0
        /// <summary>
        /// Handles event that is fired after client receives data.
        /// </summary>
        /// <param name="controller">Controller with the client.</param>
        internal void Handle_DataReceive(DataReceivedController controller)
        {
            var clientInternal = controller.ClientInternal;
            if (clientInternal.ReceiveEventArgs.SocketError != SocketError.Success)
                throw new NotImplementedException("Handle socket errors");

            _pool.Report_DataReceive(controller);

            if (clientInternal.AllowReceiving)
                _pool.Network.RequestReceiving(clientInternal);
        }