diff libmpdemux/asf_mmst_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 2ffb9a8b0428
children 54bcbf28698a
line wrap: on
line diff
--- a/libmpdemux/asf_mmst_streaming.c	Thu May 29 17:22:13 2003 +0000
+++ b/libmpdemux/asf_mmst_streaming.c	Thu May 29 19:36:58 2003 +0000
@@ -90,7 +90,7 @@
 
   memcpy (&cmd.buf[48], data, length);
 
-  if (write (s, cmd.buf, length+48) != (length+48)) {
+  if (send (s, cmd.buf, length+48, 0) != (length+48)) {
     printf ("write error\n");
   }
 }
@@ -118,7 +118,7 @@
   while (command == 0x1b) {
     int len;
 
-    len = read (s, data, BUF_SIZE) ;
+    len = recv (s, data, BUF_SIZE, 0) ;
     if (!len) {
       printf ("\nalert! eof\n");
       return;
@@ -138,7 +138,7 @@
 
   while (total < count) {
 
-    len = read (s, &buf[total], count-total);
+    len = recv (s, &buf[total], count-total, 0);
 
     if (len<0) {
       perror ("read error:");
@@ -460,7 +460,7 @@
 // send_command(s, commandno ....)
   send_command (s, 1, 0, 0x0004000b, strlen(str) * 2+8, data);
 
-  len = read (s, data, BUF_SIZE) ;
+  len = recv (s, data, BUF_SIZE, 0) ;
 
   /*This sends details of the local machine IP address to a Funnel system at the server. 
   * Also, the TCP or UDP transport selection is sent.
@@ -475,7 +475,7 @@
   memset (data, 0, 8);
   send_command (s, 2, 0, 0, 28*2+8, data);
 
-  len = read (s, data, BUF_SIZE) ;
+  len = recv (s, data, BUF_SIZE, 0) ;
 
   /* This command sends file path (at server) and file name request to the server.
   * 0x5 */