Closed mtrudel closed 2 years ago
As discussed at https://github.com/phoenixframework/phoenix/pull/4973 and planned for in https://github.com/phoenixframework/phoenix/issues/5003, this work updates the Sock API to mirror Phoenix.Socket.Transport, with a few additive changes:
Sock
Phoenix.Socket.Transport
c:Sock.init/1
c:Sock.handle_in/2
init
c:Sock.terminate/1
{:push, ...}
{:reply, ...}
c:Phoenix.Socket.Transport.start_link/1
c:Phoenix.Socket.start_link/1
As discussed at https://github.com/phoenixframework/phoenix/pull/4973 and planned for in https://github.com/phoenixframework/phoenix/issues/5003, this work updates the
Sock
API to mirrorPhoenix.Socket.Transport
, with a few additive changes:c:Sock.init/1
can now return the same set of tuples asc:Sock.handle_in/2
et al. This allowsinit
to send messages at connection timec:Sock.terminate/1
defines more possible arguments, codifying a number of common termination reasons such as server shutdown or timeout.{:push, ...}
or{:reply, ...}
may indicate the transmission of any type of framec:Phoenix.Socket.Transport.start_link/1
moves toc:Phoenix.Socket.start_link/1