source: roaraudio/roarclients/roarsocktypes.c @ 669:90348e6a785f

Last change on this file since 669:90348e6a785f was 669:90348e6a785f, checked in by phi, 16 years ago

added license statements

File size: 1.7 KB
Line 
1//roarsocktypes.c:
2
3/*
4 *      Copyright (C) Philipp 'ph3-der-loewe' Schafft - 2008
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, 675 Mass Ave, Cambridge, MA 02139, USA.
22 *
23 */
24
25#include <roaraudio.h>
26
27int main (void) {
28 int i, fh;
29 struct {
30  char * name;
31  int (*func)(void);
32 } tests[] = {
33  {"TCPv4"           , roar_socket_new_tcp },
34  {"UDPv4"           , roar_socket_new_udp },
35  {"TCPv6"           , roar_socket_new_tcp6},
36  {"UDPv6"           , roar_socket_new_udp6},
37  {"UNIX"            , roar_socket_new_unix},
38  {"DECnet seqpacket", roar_socket_new_decnet_seqpacket},
39  {"DECnet stream"   , roar_socket_new_decnet_stream},
40  {"IPX"             , roar_socket_new_ipx},
41  {"IPX/SPX"         , roar_socket_new_ipxspx},
42  {NULL, NULL}
43 };
44
45 for (i = 0; tests[i].func; i++) {
46  printf("Type %-16s ", tests[i].name);
47  errno = 0;
48  fh = tests[i].func();
49  if ( fh == -1 ) {
50   printf("not working: %s\n", strerror(errno));
51  } else {
52   close(fh);
53   printf("working\n");
54  }
55 }
56
57 return 0;
58}
59
60//ll
Note: See TracBrowser for help on using the repository browser.