Multiple JSON requests to server

General discussions and questions.
Post Reply
mlesin
Posts: 1
Joined: Mon Sep 14, 2020 8:03 pm

Multiple JSON requests to server

Post 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)
User avatar
timurhai
Site Admin
Posts: 911
Joined: Sun Jan 15, 2017 8:40 pm
Location: Russia, Korolev
Contact:

Re: Multiple JSON requests to server

Post by timurhai »

Hi!
No it isn't possible.
You should connect to server for each request.
Timur Hairulin
CGRU 3.3.1, Ubuntu 20.04, 22.04, MS Windows 10 (clients only).
Post Reply