Changeset 82:395b9657ca85 in roaraudio for libroar/stream.c


Ignore:
Timestamp:
07/12/08 18:49:34 (16 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

added roar_simple_new_stream()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libroar/stream.c

    r81 r82  
    7575int roar_stream_connect_to (struct roar_connection * con, struct roar_stream * s, int type, char * host, int port) { 
    7676 struct roar_message m; 
     77 
     78 if ( roar_stream_connect_to_ask(con, s, type, host, port) == -1 ) 
     79  return -1; 
     80 
     81 if ( roar_recv_message(con, &m, NULL) == -1 ) 
     82  return -1; 
     83 
     84 if ( m.cmd == ROAR_CMD_OK ) 
     85  return 0; 
     86 return -1; 
     87} 
     88 
     89int roar_stream_connect_to_ask (struct roar_connection * con, struct roar_stream * s, int type, char * host, int port) { 
     90 struct roar_message m; 
    7791 int len = 0; 
    7892 
     
    97111 m.datalen = len + 4; 
    98112 
    99  if ( roar_req(con, &m, NULL) == -1 ) 
     113 if ( roar_send_message(con, &m, NULL) == -1 ) 
    100114  return -1; 
    101115 
    102  if ( m.cmd == ROAR_CMD_OK ) 
    103   return 0; 
    104  return -1; 
     116 return 0; 
    105117} 
    106118 
Note: See TracChangeset for help on using the changeset viewer.