On Tue, 25 Nov 2014 19:35:43 GMT, Jan wrote:
I want to read a non array...
I have this code :
ubyte[] operation; conn.read(operation); handleP(conn, this, opcode);
i want to read regular, not array, how to do this ?
Every type is transferrable to a sequence of ubyte[] using this syntax:
int operation;
conn.read((cast(ubyte*) &operation)[0 .. int.sizeof]);
However, you should definitely use a serialization tool to move this into a lower level of abstraction.