/// <summary> /// Sends a heartbeat to the server. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void SendHeartbeat(object sender, ElapsedEventArgs e) { ToffeeClientPacket tcp = new ToffeeClientPacket(this, (ushort)ToffeeOpCode.ClientHeartbeat); Send(tcp.BuildPacket()); PingWatch.Start(); }
/// <summary> /// Sends a packet to the server. /// </summary> /// <param name="packet">The data to send.</param> public void Send(ToffeeClientPacket packet) { Send(packet.BuildPacket()); }