<commit_before>#pragma ident "$Id$"


#include <iostream>
#include <string>
using std::istream;
using std::cout;
using std::endl;

#include "TCPStream.hpp"
#include "CommandOption.hpp"
#include "CommandOptionParser.hpp"

#include <sys/errno.h>

int main(int argc, char* argv[])
{
   try
   {
      gpstk::SocketAddr client(std::string("localhost"), 4621);
      gpstk::IPaddress any;
      gpstk::SocketAddr server(any, 4621);
      int debugLevel = 0;
      gpstk::CommandOptionNoArg
         debugOption('d', "debug", "Enable debug output."),
         serverOption('s', "server", "Run as server, not client");
      std::string appDescription("Test program for the TCPStream stuff.");
      gpstk::CommandOptionParser cop(appDescription);
      cop.parseOptions(argc, argv);
      if (cop.hasErrors())
      {
         cop.dumpErrors(cout);
         cop.displayUsage(cout);
         exit(0);
      }

      debugLevel = debugOption.getCount();

      gpstk::TCPStream tcpStream;

      if (serverOption.getCount())
      {
         cout << "Running as a server on " << server << endl;<commit_msg>Add some missing headers for socket options<commit_after>#pragma ident "$Id$"


#include <iostream>
#include <string>
using std::istream;
using std::cout;
using std::endl;

#include "TCPStream.hpp"
#include "CommandOption.hpp"
#include "CommandOptionParser.hpp"

#include <sys/types.h>
#include <sys/socket.h>
#include <sys/errno.h>

int main(int argc, char* argv[])
{
   try
   {
      gpstk::SocketAddr client(std::string("localhost"), 4621);
      gpstk::IPaddress any;
      gpstk::SocketAddr server(any, 4621);
      int debugLevel = 0;
      gpstk::CommandOptionNoArg
         debugOption('d', "debug", "Enable debug output."),
         serverOption('s', "server", "Run as server, not client");
      std::string appDescription("Test program for the TCPStream stuff.");
      gpstk::CommandOptionParser cop(appDescription);
      cop.parseOptions(argc, argv);
      if (cop.hasErrors())
      {
         cop.dumpErrors(cout);
         cop.displayUsage(cout);
         exit(0);
      }

      debugLevel = debugOption.getCount();

      gpstk::TCPStream tcpStream;

      if (serverOption.getCount())
      {
         cout << "Running as a server on " << server << endl;
{'fraction_non_alphanumeric': 0.1416630004399472, 'fraction_numerical': 0.008798944126704795, 'mean_word_length': 3.2189239332096475, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '781156', 'n_tokens_mistral': 731, 'n_tokens_neox': 697, 'n_words': 171}