Thread overview
Need a working example of Socket usage
Jun 13, 2004
kinghajj
Jun 13, 2004
Vathix
Jun 15, 2004
John Reimer
June 13, 2004
All of the examples that are there (dserver/dclient/htmlget/listner) have a
bunch of errors (functions not found in phobos). Someone that knows how to use
std.socked needs to write a quick working example (I don't know!). Thx.


June 13, 2004
"kinghajj" <kinghajj_member@pathlink.com> wrote in message news:cagp0e$1ofi$1@digitaldaemon.com...
> All of the examples that are there (dserver/dclient/htmlget/listner) have
a
> bunch of errors (functions not found in phobos). Someone that knows how to
use
> std.socked needs to write a quick working example (I don't know!). Thx.
>

If using Windows, did you link with ws2_32.lib ?
Otherwise, can you show me one of the error messages?


June 15, 2004
kinghajj wrote:
> All of the examples that are there (dserver/dclient/htmlget/listner) have a
> bunch of errors (functions not found in phobos). Someone that knows how to use
> std.socked needs to write a quick working example (I don't know!). Thx.
> 
> 

Did you try looking at using the mango library?  The socket class within the package neatly integrates Christopher Miller's socket library. Mango is well documented, so you will probably have an easier time with it.

Mango also includes several useful examples.  Have a look at the library and documentation at http://www.dsource.org/projects/mango/ and then browse the unittest.d file in the online svn (or download the project zip file).  Within unittest.d you will find a testSocket() function that demonstrates its use.  There also plenty of higher level features to play with too, including servers, servlets, stream/file io, etc.  It warrants at least a serious look :-).

Later,

John