public void Send(ushort sign, object msg) { var write = new WriterMsg(sign); write.Write(msg); var bytes = write.GetBytes(); if (Client != null) { if (Client.Client.Connected) { Client.Send(bytes, bytes.Length); } } }
public void Send(ushort sign, object msg) { var write = new WriterMsg(sign); write.Write(msg); var bytes = write.GetBytes(); if (Server != null) { for (int i = 0; i < mClientList.Count; i++) { Server.Send(bytes, bytes.Length, new IPEndPoint(IPAddress.Parse(mClientList[i]), NetConst.Port)); } } }
public override void Serializer(WriterMsg writer) { writer.Write(GameObjectName); writer.Write(IsActive); }