Home |
Function telnet_server_daemon |
Function telnet_server_daemonThis function is the Telnet Server. int telnet_server_daemon(void); Parametersreturn valueOn failure, the function returns SOCKET_ERROR and xn_getlasterror and xn_geterror_string return the error value. Error Codes further describes each error. If the function succeeds, it never returns. Starting the server consists of this single function call. The function telnet_server_daemon handles all Telnet server requests. It loops forever processing Telnet client requests. The Telnet Server listens for connection requests on port number 23. For each established valid connection, a new thread is spawned to process the request. It will return only if an error is detected. One TCP socket is allocated to listen for requests. One TCP socket is allocated to process each request. The socket is closed after the request has been processed.
|