On Friday, 6 September 2013 at 20:47:54 UTC, Savsak wrote:
Hi Friends,

Socket programming with the D programming language is the most simple way how to do it

For example, the sample with Tango, but not by phobos

How do I do this with a simple, but phobos


import tango.io.Stdout;

import tango.net.Socket;
import tango.net.ServerSocket;
import tango.net.SocketConduit;

int main() {
    Socket server = new Socket(AddressFamily.UNIX,
                               SocketType.STREAM,
                               ProtocolType.IP);

    while(true) {
        Socket client = server.accept();

        char[1024] buffer;
        client.receive(buffer);

        Stdout.format("The client said'{}'.", buffer);

        client.shutdown(SocketShutdown.BOTH);
        client.detach();
    }
    return 0;
}

Try this simple socket programming....

http://csharp.net-informations.com/communications/csharp-socket-programming.htm

Reply via email to