![]() | ![]() | ![]() | GNetwork Library Manual | ![]() |
---|
Table of Contents
The GTcpConnection object provides an easy-to-use system for handling TCP/IP connections. It was intended to be used in network-oriented GUI applications, and provides utilities and features for that purpose. This tutorial covers the way to use the GTcpConnection object through subclassing, and how to use this subclass in a user application. It is a low-level tutorial for those unfamiliar with the GType/GObject type system, and how to subclass a GObject.
Since GTcpConnection is a GObject, you can sub-class it for the particular protocol you want to use. Subclassing a GObject is very easy once you're familiar with the process, and it is the recommended method for creating implementations of GTcpConnection. There are other methods, of course, but sub-classing is the "best" solution in that it helps keep the lower-level protocol handling code modular and separate from the application (similar to how GTcpConnection keeps the handling of basic networking separate from the application), which in turn allows easy re-use of the code you write.
<< Compiling GNetwork Applications | Getting Started >> |