Prosoft-technology MVI69-ADMNET Uživatelský manuál Strana 99

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 122
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 98
MVI-ADMNET 'C' Programmable WATTCP API Functions
'C' Programmable Application Development Module with Ethernet Developer's Guide
ProSoft Technology, Inc. Page 99 of 122
February 20, 2013
6.5 ADMNET API Send Socket Functions
This section describes the ADMNET API Send Socket functions.
sock_write
Syntax
int sock_write( sock_type *skType, byte *data, int len);
Parameters
skType
Socket that will be used to send data.
data
Pointer to a buffer that contains data that will be sent to a server.
len
Length of the data specified to send.
Description
This function writes data to the socket being passed to the function. The function
will wait until the all the data is written.
Return Value
Number of Bytes that are written to the socket or -1 if an error occurs.
Example
sock_type *socket;
char theBuffer [512];
int len, bytes_sent;
. . .
bytes_sent = sock_write(socket, (byte*)theBuffer, len);
See Also
sock_fastwrite (page 100)
Zobrazit stránku 98
1 2 ... 94 95 96 97 98 99 100 101 102 103 104 ... 121 122

Komentáře k této Příručce

Žádné komentáře