© Jan Newmarch 2017

Jan Newmarch, Network Programming with Go, 10.1007/978-1-4842-2692-6_4

4. Data Serialization

Jan Newmarch

(1)Oakleigh, Victoria, Australia

A client and server need to exchange information via messages. TCP and UDP provide the transport mechanisms to do this. The two processes also need to have a protocol in place so that message exchange can take place meaningfully.

Messages are sent across the network as a sequence of bytes, which has no structure except as a linear stream of bytes. We address the various possibilities for messages and the protocols that define them in the next chapter. In this chapter, we concentrate on a component of messages—the data that is transferred.

A program will typically build complex data structures ...

Get Network Programming with Go: Essential Skills for Using and Securing Networks now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.