Skip to content

Commit ec79af6

Browse files
authored
Update README.md
1 parent caa5075 commit ec79af6

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,19 @@ A library that gives you the possibility to create an EmBER+ consumer.
1414
{
1515
// Create TCP connection
1616
var tcpClient = new TcpClient();
17-
await tcpClient.ConnectAsync("localhost", "9001");
17+
await tcpClient.ConnectAsync("localhost", 9001);
1818

1919
// Establish S101 protocol
2020
// S101 provides message packaging, CRC integrity checks and a keep-alive mechanism.
2121
var stream = tcpClient.GetStream();
2222
var s101Client = new S101Client(tcpClient, stream.ReadAsync, stream.WriteAsync);
2323

2424
// Create consumer
25-
var consumer = await Consumer<MyRoot>.CreateAsync(s101Client));
25+
var consumer = await Consumer<MyRoot>.CreateAsync(s101Client);
26+
await consumer.SendAsync();
2627

2728
// Navigate down tree until IParameter is reached or desired INode
28-
var mixer = (INode)root.Children.First(c => c.Identifier == "MixerEmberIdentifier");
29+
var mixer = (consumer.Root as INode).Children.First(c => c.Identifier == "MixerEmberIdentifier");
2930
var mute = (IParameter)mixer.Children.First(c => c.Identifier == "Mute");
3031

3132
mute.Value = true;

0 commit comments

Comments
 (0)