2015-02-26 15:02:31 +00:00
|
|
|
|
2015-06-01 15:28:29 +00:00
|
|
|
#include "trick/VariableServer.hh"
|
|
|
|
#include "trick/variable_server_message_types.h"
|
|
|
|
#include "trick/tc_proto.h"
|
2015-02-26 15:02:31 +00:00
|
|
|
|
|
|
|
int Trick::VariableServerThread::write_stdio(int stream, std::string text) {
|
|
|
|
|
|
|
|
char header[16] ;
|
2022-11-15 21:00:05 +00:00
|
|
|
snprintf(header, sizeof(header), "%-2d %1d %8d\n" , VS_STDIO, stream , (int)text.length()) ;
|
2015-02-26 15:02:31 +00:00
|
|
|
tc_write(&connection , (char *) header , strlen(header)) ;
|
|
|
|
tc_write(&connection , (char *) text.c_str() , text.length()) ;
|
|
|
|
return 0 ;
|
|
|
|
}
|