MSG_WAITALL for Sockets
Jeroen Bollen
jbinero at gmail.com
Wed Nov 20 08:26:27 PST 2013
On Tuesday, 19 November 2013 at 23:36:57 UTC, Rob T wrote:
> On Tuesday, 19 November 2013 at 18:35:08 UTC, Jeroen Bollen
> wrote:
>> Is there a way I can call a receive method on a socket with
>> MSG_WAITALL as a flag? There doesn't seem to be an enum for
>> that.
>
> module core.sys.posix.sys.socket;
>
> enum : uint
> {
> MSG_CTRUNC = 0x08,
> MSG_DONTROUTE = 0x04,
> MSG_EOR = 0x80,
> MSG_OOB = 0x01,
> MSG_PEEK = 0x02,
> MSG_TRUNC = 0x20,
> MSG_WAITALL = 0x100
> }
>
>
> Use SocketFlags to set the flag.
>
> If using Windows, you can set up your own enum, as I don't
> think one is pre-defined.
>
> --rt
Thanks! I don't really get how this is working though, isn't the
point of using an enum as a type, preventing any values that's
not listed in the enum definition?
More information about the Digitalmars-d-learn
mailing list