Changeset 758:2bb998ad89ce in roaraudio


Ignore:
Timestamp:
09/05/08 04:27:08 (16 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

added roar_stream_passfh()

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • include/libroar/stream.h

    r690 r758  
    6161int roar_stream_connect_to (struct roar_connection * con, struct roar_stream * s, int type, char * host, int port); 
    6262int roar_stream_connect_to_ask (struct roar_connection * con, struct roar_stream * s, int type, char * host, int port); 
     63int roar_stream_passfh  (struct roar_connection * con, struct roar_stream * s, int fh); 
    6364 
    6465int roar_stream_add_data (struct roar_connection * con, struct roar_stream * s, char * data, size_t len); 
  • libroar/stream.c

    r733 r758  
    146146 
    147147 if ( roar_send_message(con, &m, NULL) == -1 ) 
     148  return -1; 
     149 
     150 return 0; 
     151} 
     152 
     153int roar_stream_passfh  (struct roar_connection * con, struct roar_stream * s, int fh) { 
     154 struct roar_message m; 
     155 
     156 m.cmd     = ROAR_CMD_PASSFH; 
     157 m.stream  = s->id; 
     158 m.pos     = 0; 
     159 
     160 if ( roar_send_message(con, &m, NULL) == -1 ) 
     161  return -1; 
     162 
     163 if ( roar_socket_send_fh(con->fh, fh, NULL, 0) == -1 ) 
     164  return -1; 
     165 
     166 if ( roar_recv_message(con, &m, NULL) == -1 ) 
    148167  return -1; 
    149168 
Note: See TracChangeset for help on using the changeset viewer.