reading input from stdin and udp://localhost:12345