October 2019
Intermediate to advanced
358 pages
8h 22m
English
In the request/response world, each request established a connection, which we represented in Plug.Conn. We then used ordinary functions to transform that connection until it had the response we wanted to send back to the client. Each plug didn’t use the same conn per se, but each transformation was conceptually on the same request. Each time you had a new request, you’d start from scratch with a new conn struct. Said another way, for each request, a new conn would flow through all of the pipelines and then die.
In channels, the flow is different. A client establishes a new connection with a socket. After the connection is made, that socket will be transformed through the life of the connection.
At the ...
Read now
Unlock full access