install networkmanager-l2tp first:
yaourt -S networkmanager-l2tp
apt install -y network-manager-l2tp| @Controller | |
| @Slf4j | |
| public class ReactiveController { | |
| record SomeDTO(String name, String address) { | |
| } | |
| private final Sinks.Many<SomeDTO> eventSink = Sinks.many().replay().latest(); | |
| @RequestMapping(path = "/sse", produces = MediaType.TEXT_EVENT_STREAM_VALUE) | |
| public Flux<ServerSentEvent<SomeDTO>> sse() { |
| import lombok.RequiredArgsConstructor; | |
| import org.junit.jupiter.api.Test; | |
| import reactor.core.publisher.Flux; | |
| import reactor.core.publisher.Sinks; | |
| import reactor.core.scheduler.Schedulers; | |
| import java.util.function.Function; | |
| public class SinkTests { |
| import lombok.extern.slf4j.Slf4j; | |
| import java.io.IOException; | |
| import java.io.PrintWriter; | |
| import java.net.InetAddress; | |
| import java.net.Socket; | |
| /** | |
| * Class to empirically test if our server (or whole path including reverse proxy) is thread based or event based. | |
| * Mostly copy/paste from https://stackoverflow.com/a/17558146/11152683 |