<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Sockets on Lloyd Rochester's Geek Blog</title><link>https://lloydroc.github.io/tags/sockets/</link><description>Recent content in Sockets on Lloyd Rochester's Geek Blog</description><generator>Hugo</generator><language>en</language><copyright>Copyright © 2025, Lloyd Rochester.</copyright><lastBuildDate>Thu, 27 Feb 2020 17:14:45 +0000</lastBuildDate><atom:link href="https://lloydroc.github.io/tags/sockets/index.xml" rel="self" type="application/rss+xml"/><item><title>Unix UDP Example in C</title><link>https://lloydroc.github.io/post/c/unix-udp-example/</link><pubDate>Thu, 27 Feb 2020 17:14:45 +0000</pubDate><guid>https://lloydroc.github.io/post/c/unix-udp-example/</guid><description>&lt;h1 id="hahahugoshortcode39s0hbhb">Unix UDP Example in C&lt;/h1>
&lt;p>In this post we&amp;rsquo;ll create an example client and server that communicate over UDP in C using Unix as the Operating System. UDP is a connection-less, unreliable datagram packet service. The term connection-less means there is no handshake between the client and server before information is exchanged. The term &amp;ldquo;fire and forget&amp;rdquo; applies here since the client sends and beforehand has no negotiation with the server. The term unreliable means there is no guarantee of delivery, ordering or duplicate protection. UDP is best for time-sensitive applications where it is preferable to discard packets rather than waiting for delayed ones.&lt;/p></description></item><item><title>Passing Datagrams Between Python and C</title><link>https://lloydroc.github.io/post/c/unix-domain-socket-datagram/</link><pubDate>Tue, 18 Jun 2019 06:45:00 +0000</pubDate><guid>https://lloydroc.github.io/post/c/unix-domain-socket-datagram/</guid><description>&lt;p>Let&amp;rsquo;s discuss how to pass data from a C program to a Python Script and vice-versa. This subject involves IPC - Inter-Process Communications. In this blog post we&amp;rsquo;ll discuss the more exotic IPC mechanism of the &lt;strong>Unix domain datagram socket&lt;/strong>. Specifically, this is domain &lt;code>AF_UNIX&lt;/code> and type &lt;code>SOCK_DGRAM&lt;/code> type of socket. Before you consider this method let&amp;rsquo;s address some of it&amp;rsquo;s benefits and limitations of using Unix Domain Sockets for Interprocess Communications:&lt;/p></description></item></channel></rss>