你自己编译过 Erlang 吗?可能你把加密模块搞砸了。尝试使用 Erlang Solutions 的预编译 15B02:https ://www.erlang-solutions.com/downloads/download-erlang-otp
您演示的代码在那里可以很好地传递给另一个进程:
Erlang R15B02 (erts-5.9.2) [source] [64-bit] [smp:4:4] [async-threads:0] [hipe] [kernel-poll:false]
Eshell V5.9.2 (abort with ^G)
1> {ok, LSocket} = ssl:listen(9443, [{packet, http}, {reuseaddr, true}, {active, false}, {certfile, "priv/ssl/ssl.crt"}, {keyfile, "priv/ssl/ssl.key"}]).
{ok,{sslsocket,new_ssl,
{#Port<0.719>,
{config,{ssl_options,[],verify_none,
{#Fun<ssl.1.38762831>,[]},
false,false,undefined,1,<<"priv/ssl/ssl.crt">>,undefined,
<<"priv/ssl/ssl.key">>,undefined,[],undefined,<<>>,
undefined,undefined,
[<<0,...>>,<<...>>|...],
#Fun<ssl.0.38762831>,true,...},
[{packet,http},{reuseaddr,true},{active,false}],
{socket_options,list,http,0,0,false},
[{reuseaddr,true},
{packet_size,0},
{packet,0},
{header,0},
{active,false},
{mode,binary}],
{gen_tcp,tcp,tcp_closed,tcp_error}}}}}
2>
2> ssl:getopts(LSocket, [packet]).
{ok,[{packet,http}]}
3> spawn(fun() -> ssl:getopts(LSocket, [packet]) end).
<0.42.0>
4> spawn(fun() -> error_logger:info_msg(ssl:getopts(LSocket, [packet])) end).
<0.44.0>
5>
=INFO REPORT==== 1-Nov-2012::06:07:15 ===
ERROR: {ok,[{packet,http}]} - []