public void SendWait(Header h, Subheader sh, WriteCustom wc) { PacketWriter pw = new PacketWriter(); pw.Write((byte)h); pw.Write((byte)sh); if (wc != null) { wc.Invoke(pw); } Send(pw.GetBytes(BUFFER_LENGTH)); }
private void SendCustom(Header h, Subheader sh, WriteCustom wc) { PacketWriter pw = new PacketWriter(); pw.WriteInt((int)h); pw.WriteInt((int)sh); if (wc != null) { wc.Invoke(pw); } Send(pw.GetBytes(BUFFER_LENGTH)); }
public void SendAuthCustom(Header h, Subheader sh, UserInformation i, UsernameList l, WriteCustom wc) { PacketWriter pw = new PacketWriter(); pw.WriteInt((int)h); pw.WriteInt((int)sh); pw.WriteObject(i); pw.WriteObject(l); if (wc != null) { wc.Invoke(pw); } Send(pw.GetBytes(BUFFER_LENGTH)); }