From the client side, creating a client connection:

 

using (IStorageEngine engine = STSdb.FromNetwork("localhost", 7182))
    {
        IIndex<int, string> table = engine.OpenXIndex<int, string>("table");

        for (int i = 0; i < 1000; i++)
        {
            table[i] = i.ToString();
        }

        table.Flush();
        engine.Commit();
    }

 

From the server side, starting the server:

 

using (IStorageEngine engine = STSdb.FromFile("stsdb4.sys", "stsdb4.dat"))
    {
        var server = STSdb.CreateServer(engine, 7182);

        server.Start();

        //server is ready for connections

        server.Stop();
    }

 

The created server instance will listen on the specified port and receive/send data from/to the clients.

Last edited Aug 17, 2013 at 11:03 AM by SvetoslavMateev, version 2

Comments

No comments yet.