<div dir="ltr">Unless you write it otherwise, I would imagine that each front-end
object will get its own independent socket and therefore have its own
channel to the back end. On the back end, have a listener that kicks
off one Erlang process per new socket to handle the message. Messages
in this way will not interfere with each other and you can construct
them without fear of them getting mixed up.<br>
<br>If you want to see a good example of this, look at the way the listener in the gen_smsc.erl module of the OSERL application (<a href="http://oserl.sourceforge.net/" target="_blank">http://oserl.sourceforge.net</a>)
waits for connections, spawns a session process for each connection,
and passes off the now-open socket to the spawned process (and makes it
the owner of the socket, too - important).<br><br><br></div>