Protocol Buffers with SwiftNIO

Previously, we looked at sending a simple string across the wire through TCP. Chances are you want to send more complex objects over the network. So how do we do that? One way is with Google Protocol Buffers, or protobufs for short. Taken from their developer page:

Protocol buffers are Google’s language-neutral, platform-neutral, extensible mechanism for serializing structured data — think XML, but smaller, faster, and simpler.

In this post, we are going to look at how to use protocol buffers with Swift and SwiftNIO!