Home |
Function tftpcli_recvfile |
Function tftpcli_recvfileFunction tftpcli_recvfile retrieves a file from a TFTP server. int tftpcli_recvfile(SOCKET sock, char * localname, char * name, char * mode); ParameterssockSocket returned from tftpcli_connect. localnameName of file to retrieve on the local host. nameName of file to retrieve on the remote host. modeTransfer mode string; must be "octet" for binary. return valueReturns 0 if successful, otherwise SOCKET_ERROR. If an error occurred, call xn_getlasterror and xn_geterror_string to return the error value. In addition to the error values listed below, all errors returned by recvfrom and sendto may also be set. Error Codes further describes each error. Possible values for this function are:
This routine is non-reentrant and cannot be called if the TFTP Server or any other TFTP client routine is running. vf_init must be called before tftpcli_recvfile can be used.
|