static void Main(string[] args)
        {
            //Create a list of functions that will be called when the client requests a specific one.
            List <RSN_Server_CallbackConfig> callbacks = new List <RSN_Server_CallbackConfig>();

            //Add the callback with ID 1
            callbacks.Add(new RSN_Server_CallbackConfig(1, new RSN_ServerResponse(Test), typeof(RSN_Example_SimpleClass)));

            //Create the server with password "hello"
            RSN_Server server = RSN_Server.CreateServer(callbacks.ToArray(), "hello", 13000);

            //Await ENTER
            Console.ReadLine();
        }
Example #2
0
        static void Main(string[] args)
        {
            rand = new Random();

            //This program sits on the same computer as the ARK server and is used to communicate with it.
            //It connects via TCP to communicate data.
            List <RSN_Server_CallbackConfig> callbacks = new List <RSN_Server_CallbackConfig>();

            //Add the callback with ID 1
            callbacks.Add(new RSN_Server_CallbackConfig(1, new RSN_ServerResponse(OnRequest), typeof(ArkIOInterfaceRequestData)));

            //Start server
            server = RSN_Server.CreateServer(callbacks.ToArray(), "password", 13000, false);

            Console.WriteLine("Ark IO Interface ready!");

            Console.ReadLine();
        }