As software developers, a lot of the time we're building applications that rely on some sort of network connection. Due to Ruby's great abstractions we take most of the network related stuff for granted. We think we know how all of that works, but do we? Let's go over the fundamentals together, learn about how Ruby models TCP Sockets and how we can make a good use of it.
Even if you're not doing network programming, being able to dive multiple levels to understand what's going on will give you a great advantage. The sort of concepts we'll go over this talk don't apply to Ruby only. All modern languages support the Berkeley Sockets API so this knowledge is portable and it will serve you for many years to come.
During the talk we will go through the fundamentals of programming with sockets. This includes creating sockets, client and server life-cycle, reading and writing data, non-blocking IO and connection multiplexing.
Presented at: RubyConf Uruguay 2014