Network Programming

The Go standard library provides a lot of support for network operations. It includes packages that allow you to manage TCP/IP, UDP, DNS, mail, and RPC using HTTP. Third-party packages can also fill in the gaps from what's included in the standard library, including gorilla/websockets (https://github.com/gorilla/websocket/) for a WebSocket implementation that can be used in a normal HTTP handler. This chapter explores these libraries and demonstrates some simple recipes for how you can make use of each of them. These recipes will assist developers who are unable to use a higher-level abstraction such as REST or GRPC, but need network connectivity. It's also useful for DevOps applications that need to perform DNS lookups ...

Get Go Programming Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.