45 #pragma warning(disable: 4127)
47 for (
int wait = 1000;
true; wait += 1000) {
58 std::this_thread::sleep_for(std::chrono::milliseconds(wait));
80 std::vector<unsigned char> msg;
81 msg.insert(msg.end(), toSend.begin(), toSend.end());
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
OutputDevice_Network(const std::string &host, const int port)
Constructor.
~OutputDevice_Network()
Destructor.
tcpip::Socket * mySocket
the socket to transfer the data
std::ostringstream myMessage
packet buffer
std::ostream & getOStream()
Returns the associated ostream.
virtual void postWriteHook()
Sends the data which was written to the string stream over the socket.
void connect()
Connects to host_:port_.
void send(const std::vector< unsigned char > &buffer)