/// <summary> /// The parse ping. /// </summary> /// <param name="buffer"> The buffer.</param> /// <param name="offset"> The offset.</param> /// <param name="count">The count.</param> /// <returns>Number of bytes parsed.</returns> private int ParsePing(byte[] buffer, int offset, int count) { int num = this.pingResponseBuffer.Read(buffer, offset, count); if (this.pingResponseBuffer.Complete) { PingResponse response = new PingResponse(this.pingResponseBuffer.Buffer); Action <PingResponse> onPingResponse = this.OnPingResponse; if (onPingResponse != null) { onPingResponse(response); } this.parseFunction = new ParseDelegate(this.ParseMagicNumber); } return(num); }
/// <summary> /// The on ping response. /// </summary> /// <param name="pingResponse"> The ping response.</param> protected abstract void OnPingResponse(PingResponse pingResponse);
/// <summary> /// Initializes a new instance of the <see cref="T:Photon.SocketServer.ServerToServer.PingResponseEventArgs"/> class. /// </summary> /// <param name="pingResponse">The ping response received from the server.</param> public PingResponseEventArgs(PingResponse pingResponse) { this.pingResponse = pingResponse; }