On Wed, 19 Nov 2014 20:34:26 GMT, Jan wrote:
How can i write hex decimals to stream ?
i have code like this :
import vibe.d;
import std.stdio;void run(TCPConnection conn)
{conn.write(0x00); conn.write(0x00); conn.write(0x00);
}
shared static this()
{listenTCP(3724, (conn) => run(conn));
}
thhis will give me an error, no write's callable with arguments
Hi,
write defined as void write(in ubyte[] bytes);
. So you can try conn.write(conn.write(cast(ubyte[])[0x00, 0x00, 0x00])
.