Network in phobos

Igor Lesik curoles at yahoo.com
Sun Mar 28 12:37:14 PDT 2010


"Adam Ruppe"
> Something that I think would be nice is being able to treat a network
> connection the same way we can work with files and stdin.
>
IMHO, such oversimplified approach is not very useful.
Yes, it would be so nice to have a good network library, but many things
have to be considered in order to cook decent library. One important
aspect is support for asynchronous calls; for example TCP/UDP stuff
in Boost is placed in to ASIO package.

> This is just for Linux; I haven't done Windows code like this for a
> long time and I don't remember how. But this might be a useful
> starting point anyway, so I figure I'll share it.
>
As long as you use only socket API there is no problem to write generic
code for Linux and Windows. Windows socket API even has select() function.

Igor 





More information about the Digitalmars-d mailing list