A description of how to let GnuTLS use a GSocket as transport layer.
Tag Archives: socket
SCTP socket in stream mode
SCTP sockets can operate in two modes: SOCK_SEQPACKET or SOCK_STREAM. When migrating my server from UDP to SCTP, I initially used the sequential packet mode. However, changing to stream mode offered me two significant advantages: I use threads to process data from different clients. With sequential packet mode, the callback for new data has toContinue reading “SCTP socket in stream mode”
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.
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).