29 lines
No EOL
575 B
C++
29 lines
No EOL
575 B
C++
#include <iostream>
|
|
#include <vector>
|
|
|
|
class Streamer {
|
|
public:
|
|
struct StreamInfo {
|
|
std::string sourceAddress_;
|
|
std::string destinationAddress_;
|
|
uint16_t sourcePort_;
|
|
uint16_t destinationPort_;
|
|
uint16_t vlan_;
|
|
};
|
|
|
|
Streamer(std::initializer_list<StreamInfo> info)
|
|
: info_(info) {
|
|
}
|
|
|
|
Streamer(const StreamInfo& info)
|
|
: info_{info} {
|
|
}
|
|
|
|
private:
|
|
std::vector<StreamInfo> info_;
|
|
};
|
|
|
|
int main() {
|
|
Streamer streamer({"192.168.0.0", "192.168.10.24", 5432, 5432, 12});
|
|
Streamer streamer2{};
|
|
} |