Am 20.11.2014 08:28, schrieb akaDemik:
Typo.
conn.write(cast(ubyte[])[0x00, 0x00, 0x00]);
To improve performance, and to be able to use D's generic range
functionality, I'd also recommend to wrap the connection into a vibe.stream.wrapper.StreamOutputRange
:
auto rng = StreamOutputRange(conn);
rng.put(0x00);
rng.put(0x00);
rng.put(0x00);
This will create a small buffer that will be flushed when full, when rng.flush()
is explicitly called, or when it goes out of scope.