TcpLib
Loading...
Searching...
No Matches
TcpLib (© 1995 Helmut Jakoby)

Introduction

When I was faced with the task of building a client-server application without the help of libraries like Boost or Qt for "Windows" and "Linux", the only option left was to access sockets like Winsock.

Approach

The first steps were frustrating and difficult for me. The explanations and explanations of Felix Opatz were a great help.

TCP wrapper classes

This brings me to the topic of TCP wrapper classes. I didn't want to have to keep the whole TCP stuff in my head and program it all over again the next time I had to develop a client-server application. I chose to design reusable client and server base classes.

Well then; here they are (tcp::Client and tcp::Server).

To keep the handling simple but also flexible, simple derivations from the client and server class with overwriting of one or two methods are possible (see MyTestClient and MyTestServer).

Other methods of classes that can increase flexibility are virtual and described as such.

Example

The two example classes, MyTestServer and MyTestClient, are used to illustrate the usage.

Example Main with MyTestServer

Example Main with MyTestClient

License

TcpLib is free software:

GNU Affero General Public License Usage
You can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. Please review the following information to ensure the GNU Affero General Public License requirements will be met: https://www.gnu.org/licenses/agpl-3.0.en.html.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.