Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A Networking API for the D programming language. currently just a concept to use the message passing interface from std.concurrency. overhead currently is 9byte per message.
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
src
.gitignore
Makefile
README.md

README.md

D-Networking-API

A Networking API for the D programming language. Currently just a concept to use the message passing interface from std.concurrency. overhead currently is 9byte per message.

Example usage:

int main()
{    
    auto con = Connection.connect(new InternetAddress("127.0.0.1", 9861));
    int i = 0;
    while(true)
    {
        i++;
        {//SEND
            MsgCharacterUpdate msg;
            msg.position = [i,i,i];
            msg.orientation = [i,i,i,i];
            msg.scale = [i,i,i];

            writeln("SEND:\n");
            //con.send(12345);
            con.send(msg);
            writeln("--------");
            writeln();
        }

        {//RECEIVE
            writeln("RECV:");
            con.receive(
                (MsgCharacterUpdate msg){ writeln(msg); },
                (int i){writeln("INT: ", i);}
            );
            writeln("--------");
            writeln();
        }

        Thread.sleep( dur!("msecs")( 1000 ) );
    }
    return 0;
}
Something went wrong with that request. Please try again.