websocket-manager icon indicating copy to clipboard operation
websocket-manager copied to clipboard

Build string to send in socket to server

Open Shooshpanius opened this issue 6 years ago • 0 comments

I try to send message in websocket from other soft, wich must send only string.

I intercept string in demo chat and have this:

{ "$type": "WebSocketManager.Common.Message", "messageType": 1, "data": { "$type": "WebSocketManager.Common.InvocationDescriptor", "methodName": "SendMessage", "arguments": { "$type": "System.Object[]", "$values": [ { "$type": "System.String", "$value": "test" } ] }, "identifier": { "$type": "System.Guid", "$value": "00000000-0000-0000-0000-000000000000" } } }

When i send this string to websocket, i get error:

Newtonsoft.Json.JsonSerializationException: "Type specified in JSON 'WebSocketManager.Common.InvocationDescriptor, WebSocketManager.Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' is not compatible with 'System.String, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'. Path 'data.$type', line 5, position 59."

Please, how the string to send to server must be?

Shooshpanius avatar Oct 03 '18 15:10 Shooshpanius