[En-Nut-Discussion] NutTcpReceive and fread

Marcel Bariou nut.dev at brasnah.com
Sat Jul 30 16:51:50 CEST 2005


All initializations done, what are the differences between :

A =>

   player.psi_stream = _fdopen((int) player.psi_sock, "r+b");
    ........
    ........
   if ((got = fread(mp3buf, 1, rbytes, player.psi_stream)) < 0) {....


and 

B=> 
    ..........
    ..........
    if ((got = NutTcpReceive(player.psi_sock, mp3buf, rbytes)) < 0) {...


===================================================

In my opinion they are similar, but they does not work similarly. Where am I wrong ?

Thanks

Marcel


More information about the En-Nut-Discussion mailing list