/** * <p>Callback method invoked every time a message is outgoing.</p> * * @param from the session that sent the message or null * @param to the session the message is sent to, or null for a publish. * @param message the outgoing message * @param promise the promise to notify whether message processing should continue */ default void outgoing(ServerSession from, ServerSession to, ServerMessage.Mutable message, Promise<Boolean> promise) { promise.succeed(message.isMeta() ? sendMeta(to, message) : send(from, to, message)); }