In order to learn Erlang I decided to build a simple chat server in pure Erlang no libraries, no nothing.
So I have created a server that manages to connect to my client. I know this because I have set up an alert on the connect event.
But how do I continue listening for more messages from the same socket. When I call the receive message recursively then no connection is made with the client and I am at a loss.
I have posted the question on StackOverflow with full source code.
So my questions are how do I listen for more messages on the same socket? Does gen_tcp:send() only send when the socket is closed or about to be closed?
Many Thanks in advance