Skip to content

XSockets Self hosted

Uffe Björklund edited this page Jun 16, 2015 · 3 revisions

During development it is convenient to run XSockets in a Console Application

  1. Create a new Console Application
  2. Install-Package XSockets -pre
  3. Add the code for starting a server with default settings

Code:

using XSockets.Core.Common.Socket;  
using XSockets.Plugin.Framework;  
class Program  
{  
    static void Main(string[] args)  
    {  
        using (var container = Composable.GetExport<IXSocketServerContainer>())  
        {  
            container.Start();  
            Console.WriteLine("Started, hit enter to quit");  
            Console.ReadLine();  
        }  
    }  
}  

By default the container will start endpoints on loopback and the machines other IP addresses. You will see the out put in the Console when the server starts

next

Clone this wiki locally