io.rsocket.util.ConnectionUtils Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rsocket-core Show documentation
Show all versions of rsocket-core Show documentation
Core functionality for the RSocket library
package io.rsocket.util;
import io.netty.buffer.ByteBufAllocator;
import io.rsocket.frame.ErrorFrameFlyweight;
import io.rsocket.internal.ClientServerInputMultiplexer;
import reactor.core.publisher.Mono;
public class ConnectionUtils {
public static Mono sendError(
ByteBufAllocator allocator, ClientServerInputMultiplexer multiplexer, Exception exception) {
return multiplexer
.asSetupConnection()
.sendOne(ErrorFrameFlyweight.encode(allocator, 0, exception))
.onErrorResume(err -> Mono.empty());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy