A description of how to let GnuTLS use a GSocket as transport layer.
Tag Archives: C
What is a mutex?
The concept of a “mutex” is somewhat difficult to understand at first. This is my attempt at a simple explanation.
Using GVariant tuples
How to use GVariant tuples, explained by examples.
First steps with libnl
How to find out the IP addresses associated with an interface via libnl, and some GLib stuff I learned in the process.
Using SCTP in GLib
A while ago, I wrote about using a UDP socket as event source in GLib. Now, I’m migrating my program to SCTP. The main reason is that SCTP provides reliability for sequential messages, but some of the advanced features might become useful later. Surprisingly few changes were necessary in my program: Create the socket withContinue reading “Using SCTP in GLib”
Events and threads: A mutex is not enough!
While mutexes, used the right way, prevent colliding memory access, they don’t magically solve other pitfalls of multi-threaded operation. About the ensuing trouble and the lesson learned.
Returning a string array from a D-Bus method call
How to let a dbus-glib service return an array of strings in response to a method call
Using a UDP socket as event source in GLib main loop
I found out how to get an event in the GLib main loop when a UDP socket receives data (with code snippets).
Learning GObject basics
I’ve been trying GObject out, and here are some things I learned.
Catch SIGTERM, exit gracefully
I knew that programs can catch a SIGTERM and exit gracefully. What I didn’t know is how to do that, and that it’s actually quite simple. You need just two things: A function that will cause your program to exit gracefully The sigaction() function and the struct of the same name, defined in the systemContinue reading “Catch SIGTERM, exit gracefully”