public static ByteStream GetSetFieldCommand(string _FieldName, object _Value) { ByteStream stream = new ByteStream(); stream.Write(2); Converter.Write(_FieldName, stream); Converter.Write(_Value, stream); return stream; }
public static ByteStream GetInvokeCommand(string _Name, params object[] _Parameters) { ByteStream stream = new ByteStream(); stream.Write(1); Converter.Write(_Name, stream); Converter.Write((ushort)_Parameters.Length, stream); foreach (object o in _Parameters) { Converter.Write(o, stream); } return stream; }
public override void Send(bool _BroadCast, uint _ActionID, string _FunctionName, params object[] _Parameters) { ByteStream s = new ByteStream(); s.Write((byte)(_BroadCast ? 255 : 0)); Converter.Write(_ActionID, s); s.Write(NetworkClassMaster.GetInvokeCommand(_FunctionName, _Parameters)); Send(s); }