Skip to content

BAD_RESPONSE between client-server #11

@Hoppe2808

Description

@Hoppe2808

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);'.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions