Unit mtsrv2

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Author: François PIETTE Description: This little application shows how to use the TWSocket in a multithreaded application. It is a very basic telnet werver. Each time a client connect to the server, he receive an "hello" message. Then every character sent is echoed back to the client. There are two units is this application: one for the main server code, and one for the client thread. Each time a client connect to the server, a new TWSocket is created and a new thread is launched to handle the client work. When the client disconnect, the TWSocket and the thread are destroyed. To see this demo working on your computer, start the demo then start several copies of the TELNET client program (the one which comes with Windows 95 is perfect). Then using each telnet, connect to 127.0.0.1. You'll see a new connection in the list box. You must receive the "hello" message and see each character as you type them. You can use the Disconnect button from the application or from the telnet client to see what happends (the connection should be closed). EMail: francois.piette@ping.be http://www.rtfm.be/fpiette francois.piette@rtfm.be Creation: September 21, 1997 Version: 1.02 WebSite: http://www.rtfm.be/fpiette/indexuk.htm Support: Use the mailing list twsocket@rtfm.be See website for details. Legal issues: Copyright (C) 1997 by François PIETTE This software is provided 'as-is', without any express or implied warranty. In no event will the author be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented, you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. Updates: * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

Classes

TClientThread -

Functions

Types

Constants

Variables


Functions


Types


Constants


Variables