[erlang-questions] tcp_closed message

Dmitry Belyaev be.dmitry@REDACTED
Thu Feb 21 22:38:26 CET 2019


Can you make your test code to actually open a connection to the server you are testing? There is nothing wrong in doing that from inside the same Erlang node. Then you'd be able to close that client socket and observe tcp_closed on the controlling process 

On 22 February 2019 05:23:53 GMT+11:00, Justin Wood <justin.k.wood@REDACTED> wrote:
>Hello,
>
>I have a situation where I am closing a gen_tcp/gen_udp socket within
>my Erlang application. However, I would really like it to act as if it
>were disconnected or closed from the other end. Basically I want the
>{tcp_closed, S} message to be sent to the controlling process.
>
>A simple solution would be to just send the message myself. I'm just
>not sure if that would have the exact same behaviour (there is probably
>more to it than just the closed messed) as if the socket were truly
>disconnected or closed from the other end.
>
>Justin

-- 
Kind regards,
Dmitry Belyaev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20190222/639e80eb/attachment.htm>


More information about the erlang-questions mailing list