How to use std.socket and std.socketstream? (Programming language D 2.x)

I was wondering how to use these phobos modules to use networks?

Or you can give a link to use sockets (similar or almost similar to D)

+5
source share
2 answers

std.socket.Socket is essentially a semi-thin wrapper around the operating system's own socket functions. For this reason, I recommend that you first learn the basics of socket programming in C - there are many examples for this - then the std.socket API should be trivial.

For reference: http://digitalmars.com/d/2.0/phobos/std_socket.html

+2

auto MyStream = new SocketStream(new Socket(new TcpAddress("stakoverflow.com", 80)));
+3

All Articles