Home |
Function xn_telnet_connect |
Function xn_telnet_connectThis function connects to a Telnet server. int xn_telnet_connect(tnc_context * context, const BYTE * IpAddress, word Port, dword Flags); ParameterscontextPointer to the Telnet session context structure. The application does not need to access any fields in this structure. IpAddressPointer to the IP address of the Telnet server to connect to in network byte order. PortPort to use for the connect. Specify 0 to use the default Telnet port. FlagsOptions. The following values are supported to specify the desired terminal emulation: TNC_TTY, TNC_ANSI, TNC_VT52, or TNC_VT100. Value zero defaults to TNC_TTY. return valueReturns 0 if successful, otherwise SOCKET_ERROR. If this function succeeds, the application can use xn_telnet_sendstring and xn_telnet_getstring to communicate with the server. Use xn_telnet_disconnect to terminate the session.
|