public void SendMessage(byte eventCode, object data, bool reliable, RaiseEventOptions eventOptions) { if (IsConnectedAndReady) { if (data is byte[] dataBuffer) { LastSendMessageSize = dataBuffer.Length; } client.OpRaiseEvent(eventCode, data, reliable, eventOptions); } }