summaryrefslogtreecommitdiffstats
path: root/output.c
blob: 9e54d2f8969e98bbdda9d7c88854c6771611234e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/*
 * *VERY* simple network test program
 */

#include <errno.h>
#include "network.h"

int main(int argc, char *argv[])
{
  netcon_t n;
  char line[4096];

  n = fopen_network("grvscore.zytor.com", 22392, 0);
  if ( !n ) {
    perror("output");
    exit(1);
  }

  while ( fgets_network(line, 4096, n) ) {
    fputs(line, stdout);
  }
  fclose_network(n);

  return 0;
}