Home |
Function xn_telnet_getstring |
Function xn_telnet_getstringThis function retrieves data from the Telnet server. int xn_telnet_getstring(tnc_context * context, char * buffer, int len, int timeout); ParameterscontextPointer to the Telnet session context structure. The context must have been established by xn_telnet_connect. bufferPointer to a buffer to receive the incoming data. lenNumber of bytes available in *buffer. timeoutNumber of milliseconds to wait if no data is available. return valueIf the function fails, SOCKET_ERROR. Otherwise, it returns the number of bytes received or 0 if the timeout expired with no data received. At most len-1 bytes are received. xn_telnet_getstring will null-terminate the received data. For interactive Telnet clients, it is recommended to execute xn_telnet_getstring and xn_telnet_sendstring in separate threads.
|