FiberSocket

Subclass of Phobos' socket that basically works the same way, except it yields back to the FiberManager when it would have blocked.

You should not modify the blocking flag on these and generally not construct them, connect them, or listen on them yourself (let FiberManager do the setup for you), but otherwise they work the same as the original Phobos std.socket.Socket and implement the very same interface. You can call the exact same functions with original Sockets or FiberSockets.

Constructors

this
this(FiberManager fm, AddressFamily af, SocketType st, Fiber fiber)

You should probably call the helper functions in FiberManager instead.

Members

Aliases

receive
alias receive = typeof(super).receive
receiveFrom
alias receiveFrom = typeof(super).receiveFrom

The Phobos overloads are still available too, they forward to the overrides in this class and thus work the same way.

send
alias send = typeof(super).send
sendTo
alias sendTo = typeof(super).sendTo

The Phobos overloads are still available too, they forward to the overrides in this class and thus work the same way.

Functions

receive
ptrdiff_t receive(void[] buf, SocketFlags flags)
receiveFrom
ptrdiff_t receiveFrom(void[] buf, SocketFlags flags, Address from)
ptrdiff_t receiveFrom(void[] buf, SocketFlags flags)

Yielding override of the Phobos interface

send
ptrdiff_t send(const(void)[] buf, SocketFlags flags)
sendTo
ptrdiff_t sendTo(const(void)[] buf, SocketFlags flags, Address to)
ptrdiff_t sendTo(const(void)[] buf, SocketFlags flags)

Yielding override of the Phobos interface

Meta