Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

rsocket

I am getting an error 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();

what's the mime type format to use for rsocket request stream of various binary object types? The client shows that there is a mime type.

enter image description here

A wireshark capture shows the error that appears to come from port 7000 the Java Server saying that the Net client has produced the wrong mime type

enter image description here

like image 616
rupweb Avatar asked Nov 25 '25 19:11

rupweb


1 Answers

it is a bug in RSocket-.Net. you shell pass your RSocketOptions derictly into ConnectAsync instead of passing them into the RSocketClient constructor:

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"
});
like image 152
Oleh Dokuka Avatar answered Nov 28 '25 15:11

Oleh Dokuka