Changeset 511:71b909acd31e in roaraudio


Ignore:
Timestamp:
08/15/08 03:45:14 (16 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

wrote body

File:
1 edited

Legend:

Unmodified
Added
Removed
  • roarclients/roarsocktypes.c

    r510 r511  
    44 
    55int main (void) { 
     6 int i, fh; 
     7 struct { 
     8  char * name; 
     9  int (*func)(void); 
     10 } tests[] = { 
     11  {"TCPv4"           , roar_socket_new_tcp }, 
     12  {"UDPv4"           , roar_socket_new_udp }, 
     13  {"TCPv6"           , roar_socket_new_tcp6}, 
     14  {"UDPv6"           , roar_socket_new_udp6}, 
     15  {"UNIX"            , roar_socket_new_unix}, 
     16  {"DECnet seqpacket", roar_socket_new_decnet_seqpacket}, 
     17  {"DECnet stream"   , roar_socket_new_decnet_stream}, 
     18  {NULL, NULL} 
     19 }; 
     20 
     21 for (i = 0; tests[i].func; i++) { 
     22  printf("Type %-16s ", tests[i].name); 
     23  fh = tests[i].func(); 
     24  if ( fh == -1 ) { 
     25   printf("not working\n"); 
     26  } else { 
     27   close(fh); 
     28   printf("working\n"); 
     29  } 
     30 } 
     31 
    632 return 0; 
    733} 
Note: See TracChangeset for help on using the changeset viewer.