Simple Socket Server Code
daoryn
asef at sdfv.com
Wed Feb 24 06:00:40 PST 2010
sybrandy Wrote:
> All,
>
> Does anyone know where I can get a simple example of writing a server in
> D? Just a stupid little echo server would be fine. I'm trying to write
> one myself, but for some reason it doesn't seem to be accepting any
> connections. I figure it's something stupidly simple, but I'm just not
> seeing it.
>
> Perhaps a related question is: is there anything weird about creating a
> server on windows? I'm currently using D on a windows laptop, so
> perhaps this is a platform issue? I find it unlikely, but you never know.
>
> Thanks.
>
> Casey
Check the "samples" dir inside the dmd instalation folder.
Theres a sample there named "listener.d" that shows how to use D sockets.
If you're using DMD2, the listener.d file is broken. You'll have to convert it into D2 yourself.
More information about the Digitalmars-d-learn
mailing list