MSG_WAITALL for Sockets

Rob T alanb at ucora.com
Tue Nov 19 15:36:54 PST 2013


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


More information about the Digitalmars-d-learn mailing list