private void _dataReceived(DataReceivedController controller, Block block) { ReceivedBytesCount += controller.ReceivedBytes; _serverController.DataReceived(controller, block); }
internal override void DataReceived(DataReceivedController controller, Block block) { var client = controller.ClientTag as ServerClient; client.ReportData(controller.ReceivedBytes); }
/// <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); }
internal virtual void DataReceived(DataReceivedController controller, Block block) { //by default we do nothing }
/// <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); }