/// <summary> /// Raises the TVA.Communication.ClientBase.SendComplete event. /// </summary> /// <param name="e">A TVA.DataEventArgs that contains the event data.</param> /// <remarks>This method is to be called when the client has finished sending data to the server.</remarks> protected virtual void OnSendDataComplete(IdentifiableItem<Guid, byte[]> e) { m_totalBytesSent += e.Item.Length; if (SendDataComplete != null) SendDataComplete(this, new EventArgs<IdentifiableItem<Guid, byte[]>>(e)); }
/// <summary> /// Raises the TVA.Communication.ServerBase.ReceivedClientData event. /// </summary> /// <param name="e">A TVA.DataEventArgs that contains the event data.</param> /// <remarks>This method is to be called when the server receives data from a client.</remarks> protected virtual void OnReceivedClientData(IdentifiableItem<Guid, byte[]> e) { try { e.Item = GetActualData(e.Item); } catch { // We'll just pass on the data that we received. } if (ReceivedClientData != null) ReceivedClientData(this, new EventArgs<IdentifiableItem<Guid, byte[]>>(e)); }
/// <summary> /// Raises the TVA.Communication.ClientBase.SendBegin event. /// </summary> /// <param name="e">A TVA.DataEventArgs that contains the event data.</param> /// <remarks>This method is to be called when the client begins sending data to the server.</remarks> protected virtual void OnSendDataBegin(IdentifiableItem<Guid, byte[]> e) { if (SendDataBegin != null) SendDataBegin(this, new EventArgs<IdentifiableItem<Guid, byte[]>>(e)); }