/RxJava2_Udp

RxJava2 UDP observable example

Primary LanguageJava

RxJava2_Udp

RxJava2 UDP observable example

This is an example project to experiment with RxJava2. The task is to build an Observable that will listen to a UDP port and emit all UDP packets.

see also: Stackoverflow: RxJava2 how to observe UDP packets?

The sample application is very simple.

Screenshot

The MainActivity has

  • 2 buttons Start/Stop: when you press them they will send a UDP packet to a local port (writing is done by the UdpWriter class).
  • a text-view where the received UDP-data will be appended to.

The UDP-Observable will create the observable that opens the UDP port and emits the data-packets.