public async Task SendRequestAsync(SPPMessage.MessageIds id, bool payload) { await SendAsync(new SPPMessage { Id = id, Payload = payload ? new byte[] { 0x01 } : new byte[] { 0x00 }, Type = SPPMessage.MsgType.Request }); }
public async Task SendRequestAsync(SPPMessage.MessageIds id, params byte[]?payload) { await SendAsync(new SPPMessage { Id = id, Payload = payload ?? new byte[0], Type = SPPMessage.MsgType.Request }); }