11 class UDPInput : public Input {
13 UDPInput(const std::string &stream_id, const std::string &url);
15 // Serialization/deserialization.
16 UDPInput(const InputProto &serialized);
17 virtual InputProto serialize() const;
19 virtual std::string get_url() const { return url; }
20 virtual void close_socket();
23 // Actually gets the packets.
24 virtual void do_work();
26 // Create the HTTP header.
27 void construct_header();
29 std::string stream_id;
31 // The URL and its parsed components.
33 std::string host, port, path;
35 // The socket we are receiving on (or -1).
39 #endif // !defined(_UDPINPUT_H)