WATTCP API Functions
MVI-ADMNET
♦
'C' Programmable
Ethernet Module
ProSoft Technology, Inc.
Page 79 of 90
December 13, 2006
sock_gets
Syntax:
int sock_gets( sock_type *skType, byte *data, int len);
Parameters:
skType
Socket that will be used to get string data from.
data
Pointer to the string return.
len
Specified length for the function to get the string.
Description:
This function is used for obtaining a string from the socket. The
len
parameter
specifies how long the string will be read.
Return Value:
The length read from the socket is returned.
Example:
sock_type *socket;
char data [512];
int len;
. . .
len = sock_gets(socket, data, 100);
printf("Get %d\n", len);
See Also:
sock_getc