XSockets / XSockets.Clients

Realtime clients for XSockets.NET 4.*
MIT License
11 stars 9 forks source link

Any examples with .Net Core #21

Closed DavidKCalnex closed 3 years ago

DavidKCalnex commented 3 years ago

Is there any exmaple someone could put together with this working with .Net Core. The libs themselves import but I get null back when I try the following:

XSockets.Plugin.Framework.Composable.GetExport<IXSocketServerContainer>();

Any help at all would be much appreciated!

uffebjorklund commented 3 years ago

@DavidKCalnex Created a small sample here... https://github.com/uffebjorklund/XSockets.dotnetcore.sample But basiccally all you need is the preview package <PackageReference Include="XSockets.Server" Version="5.8.0-preview001" /> since the others doe snot support dotnet core.

using System;
using XSockets.Core.Common.Socket;
using XSockets.Plugin.Framework;

namespace SampleServer
{
    class Program
    {
        static void Main(string[] args)
        {
            using (var container = Composable.GetExport<IXSocketServerContainer>())
            {
                container.Start();
                Console.ReadLine();
            }
        }
    }
}
DavidKCalnex commented 3 years ago

Wow what a response!

That'll do thank you very much sir!

David