How can I read a uint from a connected socket directly without having to do any conversion.
Effectively, what is the D equivalent to read(sock, &four_byte_var, 4). I can’t seem to convert a uint to anything that the D standard library socket.receive(void[]) will accept.
You need to pass a slice that surrounds the variable:
Note that this approach is endian-sensitive.