C# net RSocket 客户端无效的 MIME 类型 "binary" 与 Java RSocket 服务器

C# net RSocket client invalid mime type "binary" with Java RSocket server

我遇到错误 0000 Error {000}: [00000003] Invalid mime type "binary": does not contain '/'

var client = new RSocketClient(new WebSocketTransport("ws://127.0.0.1:7000/quotes"), new RSocketOptions() { 
    InitialRequestSize = 3,
    DataMimeType = "application/x-binary",
    MetadataMimeType = "application/x-binary"
});

await client.ConnectAsync();

用于各种二进制对象类型的 rsocket 请求流的 mime 类型格式是什么?客户端显示有mime类型

wireshark 捕获显示错误似乎来自端口 7000 Java 服务器说 Net 客户端产生了错误的 mime 类型

这是 RSocket-.Net 中的错误。您 shell 直接将 RSocketOptions 传递给 ConnectAsync 而不是将它们传递给 RSocketClient 构造函数:

var client = new RSocketClient(new WebSocketTransport("ws://127.0.0.1:7000/quotes"));

await client.ConnectAsync(new RSocketOptions() { 
    InitialRequestSize = 3,
    DataMimeType = "application/x-binary",
    MetadataMimeType = "application/x-binary"
});