Prosoft-technology MVI69-ADMNET Manuel d'utilisateur Page 105

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 122
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 104
MVI-ADMNET 'C' Programmable WATTCP API Functions
'C' Programmable Application Development Module with Ethernet Developer's Guide
ProSoft Technology, Inc. Page 105 of 122
February 20, 2013
6.6 ADMNET API Receive Socket Functions
This section describes the ADMNET API Receive Socket functions.
sock_read
Syntax
int sock_read( sock_type *skType, byte *data, int len);
Parameters
skType
Socket that will be used to receive data.
data
Pointer to a buffer that contains data that is received.
len
Length of the data specified to receive.
Description
This function reads data from the socket being passed to the function. The
function will wait until the all the data is read.
Return Value
Number of Bytes that are read to the socket or -1 if an error occurs.
Example
sock_type *socket;
char theBuffer [512];
int len, bytes_receive;
. . .
bytes_receive = sock_read(socket, (byte*)theBuffer, len);
See Also
sock_fastread (page 106)
Vue de la page 104
1 2 ... 100 101 102 103 104 105 106 107 108 109 110 ... 121 122

Commentaires sur ces manuels

Pas de commentaire