ZeroMQ を介して Python コードから C# にメッセージを送信しようとしています。Python で次のデータ構造を使用しています。
message = msgpack.packb(
(
{"message_id": "1001", "type": "GET", "namespace": "DocumentManager"},
"MdiActiveDocument",
["parameter1", "parameter2"]
)
)
message = msgpack.packb(message)
alive_socket.send(message)
次のコードを使用して、C# で展開しようとしています。
var message = new byte[500];
int result = this.Client.Receive(message);
var serializer =
MessagePackSerializer.Get<Tuple<Dictionary<string,string>, String, List<String>>>();
var reply = serializer.UnpackSingleObject(message);
次のエラーが発生します。
Additional information: Unpacker is not in the array header.
The stream may not be array.
データ構造を単純化しようとしましたが、まだ正しくできません。おそらく、私の MsgPack の使い方に問題があるのでしょう。助けてくれてありがとう。