Page 1 of 1

Multiple JSON requests to server

Posted: Mon Sep 14, 2020 8:24 pm
by mlesin
Is it possible to communicate with a server with JSON API without setting up a new socket for each request?
For now, I'm opening a socket to server using 51000 port, sending a JSON request, like this:

Code: Select all

{
    "get":{
        "type": "renders",
        "mask": "myhost"
    }
}
Receiving whole response successfully, but when I try to send this request again using the same open socket, I'm getting "Connection reset by peer"
What am I missing here?
(Afanasy 2.3.0)

Re: Multiple JSON requests to server

Posted: Tue Sep 15, 2020 7:52 am
by timurhai
Hi!
No it isn't possible.
You should connect to server for each request.