Changeset 1291:ba7f52e15690 in roaraudio


Ignore:
Timestamp:
03/12/09 02:23:49 (15 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

added roar_vio_open_socket() and useless roar_vio_open_socket_listen()

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • include/libroar/vio.h

    r1290 r1291  
    101101int     roar_vio_open_fh_socket(struct roar_vio_calls * calls, int fh); 
    102102 
     103int     roar_vio_open_socket   (struct roar_vio_calls * calls, char * host, int port); 
     104int     roar_vio_open_socket_listen(struct roar_vio_calls * calls, int type, char * host, int port); 
     105 
    103106int     roar_vio_simple_stream (struct roar_vio_calls * calls, int rate, int channels, int bits, int codec, 
    104107                                                               char * server, int dir, char * name); 
  • libroar/vio.c

    r1290 r1291  
    181181 
    182182 return roar_vio_open_fh(calls, fh); 
     183} 
     184 
     185int     roar_vio_open_socket   (struct roar_vio_calls * calls, char * host, int port) { 
     186 int fh; 
     187 
     188 if ( calls == NULL ) 
     189  return -1; 
     190 
     191 if ( (fh = roar_socket_connect(host, port)) == -1 ) 
     192  return -1; 
     193 
     194 return roar_vio_open_fh_socket(calls, fh); 
     195} 
     196 
     197int     roar_vio_open_socket_listen(struct roar_vio_calls * calls, int type, char * host, int port) { 
     198 int fh; 
     199 
     200 if ( calls == NULL ) 
     201  return -1; 
     202 
     203 if ( (fh = roar_socket_listen(type, host, port)) == -1 ) 
     204  return -1; 
     205 
     206 return roar_vio_open_fh_socket(calls, fh); 
    183207} 
    184208 
Note: See TracChangeset for help on using the changeset viewer.