-
Notifications
You must be signed in to change notification settings - Fork 2
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
Comments
Hej Sebastian,
Have you resolved The issue?
Best
Shane
Sent from my Samsung Galaxy smartphone.
…-------- Original message --------
From: Sebastian Hoppe <[email protected]>
Date: 1/10/19 14:23 (GMT+01:00)
To: pSpaces/dotSpace <[email protected]>
Cc: Subscribed <[email protected]>
Subject: [pSpaces/dotSpace] BAD_RESPONSE between client-server (#11)
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);'.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FpSpaces%2FdotSpace%2Fissues%2F11&data=02%7C01%7C%7C6bc6d68bda7747b56c3908d676febe67%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636827233812514489&sdata=oQ4qpMRszfuPnzlLCea8t1RYxTg%2BcLTluVi8erWw%2FxA%3D&reserved=0>, or mute the thread<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FACNHcjMgqbuVyaCEf94wckj6tS2WAOBfks5vBz6vgaJpZM4Z5fPE&data=02%7C01%7C%7C6bc6d68bda7747b56c3908d676febe67%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636827233812514489&sdata=gSvRYQSanoGOcaqQHvZQc%2F8KbMNOM3AdFK3jH7jbgRM%3D&reserved=0>.
|
Unfortunately no, i did not manage. |
That would be nice. How would you best be able to help? |
@Hoppe2808 have you managed to run some of the examples that come with the library? |
The bad response from the client is probably because it can't connect to the server.
Looking at your code it seems the connection string is parsed through a Uri object. You don't need that.
Just use the connection string directly when adding the gate. Goto the dotSpace-examples and copy the code for "client" and "server". Once you get that running, you can use that as a template. Also, some ports are reserves for some systems, so be sure that the port you are using is free.
I think that should do the trick.
Best
Shane
Sent from my Samsung Galaxy smartphone.
…-------- Original message --------
From: Sebastian Hoppe <[email protected]>
Date: 1/10/19 16:01 (GMT+01:00)
To: pSpaces/dotSpace <[email protected]>
Cc: sequenze <[email protected]>, Comment <[email protected]>
Subject: Re: [pSpaces/dotSpace] BAD_RESPONSE between client-server (#11)
That would be nice. How would you best be able to help?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FpSpaces%2FdotSpace%2Fissues%2F11%23issuecomment-453125772&data=02%7C01%7C%7Cc344f01847894f88d08308d6770c8df8%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636827293128038501&sdata=LVbkSnQ2e%2B%2FJzW3QpshzWMc0LLugnxlMNaBaX3ECbTE%3D&reserved=0>, or mute the thread<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FACNHclvNiEIwczG7Kxaev1-FaR_V-480ks5vB1XfgaJpZM4Z5fPE&data=02%7C01%7C%7Cc344f01847894f88d08308d6770c8df8%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636827293128038501&sdata=g%2FSyeySTLbpsmu8qVjtjiQTPjUGuV2TWWKe%2B%2FRTI%2Faw%3D&reserved=0>.
|
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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:
This is the Client code
The error appears on this line on the client: 'space.Put("User connected...", 1);'.
The text was updated successfully, but these errors were encountered: