asynchronous gen_tcp
Eric Merritt
cyberlync@REDACTED
Tue Aug 24 20:47:35 CEST 2004
Guys,
Thanks to the good tutorials out there I have finally gotten my
mind around the use of gen_server and to some extent gen_tcp. I have
a few other questions that I havn't quite figured out yet.
In the current configuration I am trying to build, I have 3 processes.
A - gen_server that handles listening for sockets, spawning
acceptors, managing connections, etc.
B - Accepts the connection and continues on to handle
requests/responses from the tcp connection and from process C (the
worker).
C - The actual worker process. Receives messages from B (parsed
and erlangified messages from the connection) and others, sends
messages to erlangified messages to B when output to the client is
required.
My biggest problem right now is that when B is waiting on
gen_tcp:recv it can't receive messages from C to send. B needs to
work in a more async manner. I seem to remember seeing something
like this at some point, but now I can't seem to find it.
Thanks for your help,
Eric
--
Any sufficiently complicated C or Fortran program contains an ad-hoc,
informally-specified, bug-ridden, slow implementation of half of Lisp
More information about the erlang-questions
mailing list