Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BAD_RESPONSE between client-server #11

Open
Hoppe2808 opened this issue Jan 10, 2019 · 6 comments
Open

BAD_RESPONSE between client-server #11

Hoppe2808 opened this issue Jan 10, 2019 · 6 comments

Comments

@Hoppe2808
Copy link

Hoppe2808 commented Jan 10, 2019

So when connecting to a RemoteSpace, and then doing a Put/Get/Query, i get a BAD_RESPONSE exception, and i can't figure out if i am doing something wrong.

This is the server code:

using dotSpace.Interfaces.Space;
using dotSpace.Objects.Network;
using dotSpace.Objects.Space;
using System;

namespace GameServer
{
    class Program
    {
        static void Main(string[] args)
        {
            SpaceRepository repo = new SpaceRepository();
            SequentialSpace space = new SequentialSpace();

            string uri = "tcp://127.0.0.1:9841/?KEEP";

            Uri myUri = new Uri(uri);
            string gate = "tcp://" + myUri.Host + ":" + myUri.Port + "?KEEP";

            repo.AddGate(gate);
            repo.AddSpace("space", space);

            space.Put("gate: " + gate, 1);
            while (true)
            {
                Console.WriteLine(space.Get(typeof(string), typeof(int))[0]);
            }
        }
    }
}

This is the Client code

using dotSpace.Enumerations;
using dotSpace.Interfaces.Space;
using dotSpace.Objects.Network;
using System;

namespace Client
{
    class Program
    {
        static void Main(string[] args)
        {
            string uri = "tcp://127.0.0.1:9841/space?KEEP";
            RemoteSpace space = new RemoteSpace(uri);
            Console.WriteLine("Connected to host..");

            space.Put("User connected...", 1);
            Console.ReadLine();
        }
    }
}

The error appears on this line on the client: 'space.Put("User connected...", 1);'.

@sequenze
Copy link
Member

sequenze commented Jan 10, 2019 via email

@Hoppe2808
Copy link
Author

Unfortunately no, i did not manage.

@sequenze
Copy link
Member

sequenze commented Jan 10, 2019 via email

@Hoppe2808
Copy link
Author

That would be nice. How would you best be able to help?

@albertolluch
Copy link
Member

@Hoppe2808 have you managed to run some of the examples that come with the library?

@sequenze
Copy link
Member

sequenze commented Jan 10, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants