摘要: Server:-module(echo).-export([listen/1]).-define(TCP_OPTIONS, [binary, {packet, 0}, {active, false}, {reuseaddr,true}]).% Call echo:listen(Port) to start the service.listen(Port) -> {ok, LSocket} = gen_tcp:listen(Port, ?TCP_OPTIONS), spawn(fun()->accept1(LSocket) end), spawn(fun()->accept2( 阅读全文
posted @ 2014-03-28 01:54 vinsonliudk 阅读(331) 评论(0) 推荐(0) 编辑