www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Need a working example of Socket usage

reply kinghajj <kinghajj_member pathlink.com> writes:
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.
Jun 12 2004
next sibling parent "Vathix" <vathixSpamFix dprogramming.com> writes:
"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?
Jun 13 2004
prev sibling parent John Reimer <brk_6502 NOSP_AM.yahoo.com> writes:
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
Jun 14 2004