source: roaraudio/roarclients/roarsocktypes.c @ 3811:49db840fb4f4

Last change on this file since 3811:49db840fb4f4 was 3811:49db840fb4f4, checked in by phi, 14 years ago

fixed some copyright statements

File size: 1.7 KB
Line 
1//roarsocktypes.c:
2
3/*
4 *      Copyright (C) Philipp 'ph3-der-loewe' Schafft - 2008-2010
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 (void) {
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 for (i = 0; tests[i].func; i++) {
47  printf("Type %-16s ", tests[i].name);
48  errno = 0;
49  fh = tests[i].func();
50  if ( fh == -1 ) {
51   printf("not working: %s\n", strerror(errno));
52  } else {
53   close(fh);
54   printf("working\n");
55  }
56 }
57
58 return 0;
59}
60
61//ll
Note: See TracBrowser for help on using the repository browser.