Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ssl/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/unity3d/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ssl erlang安全tcp中的{active,N}模式_Ssl_Tcp_Erlang - Fatal编程技术网

Ssl erlang安全tcp中的{active,N}模式

Ssl erlang安全tcp中的{active,N}模式,ssl,tcp,erlang,Ssl,Tcp,Erlang,我使用ssltcp编写了以下简单代码: ssl:start(). {ok, ListenSocket} = ssl:listen(9999, [{certfile, "cert.pem"}, {keyfile, "key.pem"},{reuseaddr, true}]). {ok, Socket} = ssl:transport_accept(ListenSocket). ssl:ssl_accept(Socket). ssl:setopts(Socket, [{active, once}])

我使用ssltcp编写了以下简单代码:

ssl:start().
{ok, ListenSocket} = ssl:listen(9999, [{certfile, "cert.pem"}, {keyfile, "key.pem"},{reuseaddr, true}]).
{ok, Socket} = ssl:transport_accept(ListenSocket).
ssl:ssl_accept(Socket).
ssl:setopts(Socket, [{active, once}]).
它工作正常,但当我将
{active,one}
替换为
{active,3}
时,返回以下错误:

{错误,{options,{socket_options,{active,3}}}


如何在安全tcp中使用
{active,N}
模式?

SSL连接未实现
{active,N}
模式。我最初编写了
{active,N}
模式,当我研究如何为SSL实现它时,我发现在底层TCP套接字之上实现Erlang SSL套接字的方式涉及在这些套接字上作为协议实现的一部分在主动和被动模式之间进行更改,因此实现
{active,N}
对于SSL,不仅仅是在该模式下打开基础套接字的问题