Socket - handling large numbers of incoming connections
Daniel Kozák via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Mon Dec 21 15:17:45 PST 2015
V Mon, 21 Dec 2015 20:53:14 +0000
Jakob Jenkov via Digitalmars-d-learn
<digitalmars-d-learn at puremagic.com> napsáno:
> On Monday, 21 December 2015 at 20:20:44 UTC, Stefan wrote:
> > How about https://github.com/dcarp/asynchronous ? Asyncio
> > Socket handling is sometimes quite nice. It's performance is
> > okay for nearly no effort and the code looks clean.
> > Details here:
> > http://dcarp.github.io/asynchronous/asynchronous/streams/startServer.html
> >
> > vibe.d also offers a fiber based asyncio way of dealing with
> > sockets.
> > http://vibed.org/docs#tcp-server
> >
> > Maybe it fits your needs.
>
> Thanks - but I am primarily looking for a solution without
> external frameworks. Frameworks have a way of bloating over time.
Use vibe.d or other library for async io (libasync). If you want to
reinvent the wheel you can use
kqueue(https://github.com/D-Programming-Language/druntime/blob/1f957372e5dadb92ab1d621d68232dbf8a2dbccf/src/core/sys/freebsd/sys/event.d)
for bsd,
epoll(https://github.com/D-Programming-Language/druntime/blob/master/src/core/sys/linux/epoll.d)
for linux and "I do not use windows" for windows.
More information about the Digitalmars-d-learn
mailing list