gen_tcp and message handling

James Hague james@REDACTED
Tue Jan 11 05:03:03 CET 2005

Methinks the speed issue has derailed this discussion!  I do admit 
that I like to read Joe's rants about writing slow code, though :-)

In any case, the clean solution being argued for here is also the 
faster one, so the point is moot.  gen_tcp (and gen_udp) are 
asymmetricl as currently implemented.  You can receive packets as 
Erlang messages but you can't send packets as Erlang messages.  
That's wrong.  It should either be changed so it works both ways or 
the current half-solution should be deprecated.  In the latter case, 
you'd be forced to create a little process to wrap around gen_tcp so 
you can send and receive messages as expected, even though 
gen_tcp:send and gen_tcp:recv are doing the work behind the scenes.


More information about the erlang-questions mailing list