Cilent send() method definition #206
Answered
by
ndoschek
ZhaolinFang
asked this question in
ModelServer
Answered by
ndoschek
Apr 11, 2023
Replies: 1 comment 4 replies
|
Hi @ZhaolinFang, A Model Server Message basically consists of the message This message would look like this: { "type": "keepAlive", "data": "" }If you would now try to send this message via the Java Client (which I assume from your description), this could look like this: JsonNode node = Json.object(
Json.prop(JsonRequestMember.TYPE, Json.text("keepAlive")),
Json.prop(JsonRequestMember.DATA, Json.text(""))
);
client.send(modelUri, node.toString());or simpler: client.send(modelUri, "{\"type\":\"keepAlive\",\"data\":\"\"}");As mentioned, the Model Server currently only accepts this type of websocket message. HTH and best regards, |
4 replies
Answer selected by
ZhaolinFang
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Hi @ZhaolinFang,
A Model Server Message basically consists of the message
typeand the messagedata. In the websocket use case, this message is typically astring.Currently, there is only one type of message accepted by the Model Server, which is the
keepAlivemessage.This message would look like this:
{ "type": "keepAlive", "data": "" }If you would now try to send this message via the Java Client (which I assume from your description), this could look like this:
or simpler: