<html><head></head><body>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 <br><br><div class="gmail_quote">On 22 February 2019 05:23:53 GMT+11:00, Justin Wood <justin.k.wood@protonmail.com> wrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div>Hello,<br></div><div><br></div><div>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.<br></div><div><br></div><div>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.<br></div><div><br></div><div>Justin<br></div></blockquote></div><br>-- <br>Kind regards,<br>Dmitry Belyaev</body></html>