You should now have an understanding about how networking works and how the sockets API was designed around it. You should be able to use the sockets API to connect to other computers on the Internet and send and receive data from them. I’ve explained the troubles of trying to use sockets and maintain responsiveness in the GUI at the same time, as well as how to use select() to avoid these troubles. But more importantly, you’ve learned how GLib provides an API for you, allowing it to keep the GUI and your network connections running smoothly.
In the next chapter, I’ll expand on how to use networking, explaining exactly what kind of data gets sent and received to implement instant messaging. Although I will use IM-specific examples, the design principles of the protocols I’ll discuss apply to any network protocol, even ones you may need to design yourself.
Unable to display preview. Download preview PDF.