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(int stream_index);
25 // Actually gets the packets.
26 virtual void do_work();
28 // Create the HTTP header.
29 void construct_header();
31 std::vector<int> stream_indices;
33 // The URL and its parsed components.
35 std::string host, port, path;
37 // The HTTP header we're sending to clients.
38 std::string http_header;
40 // The socket we are receiving on (or -1).
44 #endif // !defined(_UDPINPUT_H)