hikalkan / scs

TCP Server/Client Communication and RMI Framework
MIT License
225 stars 112 forks source link

Compilation error #19

Closed nilopaim closed 7 years ago

nilopaim commented 7 years ago

On the sample server I got compilation error when on "e.Client.MessageReceived" saying that "'IScsClientService' does not contains a definition for 'MessageReceived'"...

What am I missing?

        static void Server_ClientConnected(object sender, ServerClientEventArgs e)
        {
            Console.WriteLine("A new client is connected. Client Id = " + e.Client.ClientId);

            //Register to MessageReceived event to receive messages from new client
            e.Client.MessageReceived += Client_MessageReceived;
        }

By the way, very nice piece of software! Congratulations!

hikalkan commented 7 years ago

Actually, IScsClientService (https://github.com/hikalkan/scs/blob/master/src/Scs/Communication/Scs/Server/IScsServerClient.cs#L11) is derived from IMessenger (https://github.com/hikalkan/scs/blob/master/src/Scs/Communication/Scs/Communication/Messengers/IMessenger.cs#L15) which defines the MessageReceived event.

You may need to restore nuget packages, I could not understand it

nilopaim commented 7 years ago

Thanks for your prompt answer.

It was my fault. when I created my server on a wrong way.

I'm using Windows 10, 64 bits, Visual Studio 2015 and Scs version from the nuget package.

Again, very nice software! Congratulations and thanks for your help!