Changeset 506:8548c6327f60 in roaraudio for libroar/stream.c


Ignore:
Timestamp:
08/14/08 19:16:33 (16 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

added roar_stream_send_data()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libroar/stream.c

    r496 r506  
    138138  return 0; 
    139139 return -1; 
     140} 
     141 
     142int roar_stream_send_data (struct roar_connection * con, struct roar_stream * s, char * data, size_t len) { 
     143 if ( ! s ) 
     144  return -1; 
     145 
     146 if ( s->fh == -1 ) { 
     147  if ( !con ) 
     148   return -1; 
     149 
     150  if ( roar_stream_add_data(con, s, data, len) == -1 ) 
     151   return -1; 
     152 
     153  return len; 
     154 } 
     155 
     156 return write(s->fh, data, len); 
    140157} 
    141158 
Note: See TracChangeset for help on using the changeset viewer.