source: roaraudio/roarclients/roarsocktypes.c @ 5381:430b1d26e12d

Last change on this file since 5381:430b1d26e12d was 5381:430b1d26e12d, checked in by phi, 12 years ago

updated copyright years

File size: 1.8 KB
Line 
1//roarsocktypes.c:
2
3/*
4 *      Copyright (C) Philipp 'ph3-der-loewe' Schafft - 2008-2012
5 *
6 *  This file is part of roarclients a part of RoarAudio,
7 *  a cross-platform sound system for both, home and professional use.
8 *  See README for details.
9 *
10 *  This file is free software; you can redistribute it and/or modify
11 *  it under the terms of the GNU General Public License version 3
12 *  as published by the Free Software Foundation.
13 *
14 *  RoarAudio is distributed in the hope that it will be useful,
15 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
16 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 *  GNU General Public License for more details.
18 *
19 *  You should have received a copy of the GNU General Public License
20 *  along with this software; see the file COPYING.  If not, write to
21 *  the Free Software Foundation, 51 Franklin Street, Fifth Floor,
22 *  Boston, MA 02110-1301, USA.
23 *
24 */
25
26#include <roaraudio.h>
27
28int main (int argc, char * argv[]) {
29 int i, fh;
30 struct {
31  char * name;
32  int (*func)(void);
33 } tests[] = {
34  {"TCPv4"           , roar_socket_new_tcp },
35  {"UDPv4"           , roar_socket_new_udp },
36  {"TCPv6"           , roar_socket_new_tcp6},
37  {"UDPv6"           , roar_socket_new_udp6},
38  {"UNIX"            , roar_socket_new_unix},
39  {"DECnet seqpacket", roar_socket_new_decnet_seqpacket},
40  {"DECnet stream"   , roar_socket_new_decnet_stream},
41  {"IPX"             , roar_socket_new_ipx},
42  {"IPX/SPX"         , roar_socket_new_ipxspx},
43  {NULL, NULL}
44 };
45
46 roar_debug_bin_obsolete(argv[0], NULL, NULL);
47
48 for (i = 0; tests[i].func; i++) {
49  printf("Type %-16s ", tests[i].name);
50  errno = 0;
51  fh = tests[i].func();
52  if ( fh == -1 ) {
53   printf("not working: %s\n", strerror(errno));
54  } else {
55   close(fh);
56   printf("working\n");
57  }
58 }
59
60 return 0;
61}
62
63//ll
Note: See TracBrowser for help on using the repository browser.