diff libmpdemux/asf_streaming.c @ 10206:35e306346e59

Using recv/send instead read/write for proper MinGW support (it's a 4.2BSD standard). Patch by FloDt <flodt8@yahoo.de>
author alex
date Thu, 29 May 2003 19:36:58 +0000
parents 58e5880f4788
children 54bcbf28698a
line wrap: on
line diff
--- a/libmpdemux/asf_streaming.c	Thu May 29 17:22:13 2003 +0000
+++ b/libmpdemux/asf_streaming.c	Thu May 29 19:36:58 2003 +0000
@@ -656,7 +656,7 @@
 		http_hdr = asf_http_request( stream->streaming_ctrl );
 		mp_msg(MSGT_NETWORK,MSGL_DBG2,"Request [%s]\n", http_hdr->buffer );
 		for(i=0; i < (int)http_hdr->buffer_size ; ) {
-			int r = write( fd, http_hdr->buffer+i, http_hdr->buffer_size-i );
+			int r = send( fd, http_hdr->buffer+i, http_hdr->buffer_size-i, 0 );
 			if(r <0) {
 				mp_msg(MSGT_NETWORK,MSGL_ERR,"Socket write error : %s\n",strerror(errno));
 				return -1;
@@ -666,7 +666,7 @@
 		http_free( http_hdr );
 		http_hdr = http_new_header();
 		do {
-			i = read( fd, buffer, BUFFER_SIZE );
+			i = recv( fd, buffer, BUFFER_SIZE, 0 );
 //printf("read: %d\n", i );
 			if( i<=0 ) {
 				perror("read");