Closed nathanl closed 6 months ago
push/4
is ultimately gen_tcp:send/2
(or ssl:send/2
depending on the connection) which is a non-blocking send as the Erlang docs put it. We could add some more docs to push/4
that are clearer about that behavior - would you like to submit a PR?
I have been tinkering to see if a successful return value for
push/4
implies any kind of network ack. I wondered - does it mean that my channel process on the other end has the message in its inbox?The answer is "no". In my testing, if I'm pushing to a remote server,
push/4
returns{:ok, ref}
even if I've turned off WiFi (as long as I useheartbeat_interval_msec: 0
so that Slipstream doesn't notice that the connection is down).The docs say
which in hindsight, is fairly clear that no TCP
ack
is implied. But I wonder: would it be better to say something like "until the message has been accepted by the OS network stack for sending"?