11 class UDPInput : public Input {
13 UDPInput(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();
22 virtual void add_destination(const std::string &stream_id)
24 stream_ids.push_back(stream_id);
28 // Actually gets the packets.
29 virtual void do_work();
31 // Create the HTTP header.
32 void construct_header();
34 std::vector<std::string> stream_ids;
36 // The URL and its parsed components.
38 std::string host, port, path;
40 // The socket we are receiving on (or -1).
44 #endif // !defined(_UDPINPUT_H)