Cilent send() method definition #206
-
Beta Was this translation helpful? Give feedback.
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, |
Beta Was this translation helpful? Give feedback.
Hi @ZhaolinFang,
A Model Server Message basically consists of the message
type
and 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
keepAlive
message.This message would look like this:
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: