I spent the last hour re-familiarizing myself with Unix sockets via man-pages and HOWTOs. I have written client/server socket apps a dozen times before but because of iterative development I no longer had a simple example lying around.
To save myself this trouble in the future I created a little socket client and server for future reference. This app allows you to have a Twitter style conversation (140 char limit) with everyone on your system who has permissions to the Unix socket! Perhaps the Unix shell is the next micro-blogging platform.

2 Comments
Quick note: it is technically possible for send() to not send all of “len”, and the return value should be tested more closely to send any left-over bytes.
Hi
2 Trackbacks
[...] loveress on Sun 28-9-2008 Why People Believe in Religion Saved by HungryMikey on Sun 28-9-2008 example code: socket server and client using select() Saved by SierraLorna on Sun 28-9-2008 Build Median Aggregate Function in SQL Saved by HatakeAyumi [...]
[...] - bookmarked by 4 members originally found by kangas on 2008-11-02 example code: socket server and client using select() http://ifup.org/2008/08/30/example-code-socket-server-and-client-using-select - bookmarked by 5 [...]