From 79c8a0574648ffb5c1f71efb24a41ffa83c69317 Mon Sep 17 00:00:00 2001 From: Libing Chen Date: Sat, 24 Oct 2020 20:43:36 -0700 Subject: [PATCH] Add capnp & flatbuffers serialization support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cap’n Proto and FlatBuffers are high performance serialization library, and they should be included in WellKnownType, and especially useful to per stream DataMimeType, and text MimeType is too long for them because of performance. Signed-off-by: linux_china --- .../src/main/java/io/rsocket/metadata/WellKnownMimeType.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rsocket-core/src/main/java/io/rsocket/metadata/WellKnownMimeType.java b/rsocket-core/src/main/java/io/rsocket/metadata/WellKnownMimeType.java index e78e87629..bf7fe8fd0 100644 --- a/rsocket-core/src/main/java/io/rsocket/metadata/WellKnownMimeType.java +++ b/rsocket-core/src/main/java/io/rsocket/metadata/WellKnownMimeType.java @@ -70,6 +70,8 @@ public enum WellKnownMimeType { APPLICATION_HESSIAN("application/x-hessian", (byte) 0x26), APPLICATION_JAVA_OBJECT("application/x-java-object", (byte) 0x27), APPLICATION_CLOUDEVENTS_JSON("application/cloudevents+json", (byte) 0x28), + APPLICATION_CAPNP("application/x-capnp", (byte) 0x29), + APPLICATION_FLATBUFFER("application/x-flatbuffers", (byte) 0x2A), // ... reserved for future use ... MESSAGE_RSOCKET_MIMETYPE("message/x.rsocket.mime-type.v0", (byte) 0x7A),