我正在尝试使用inet的tftp,但我做了一些不正确的事情。虽然This simple example application确实绑定到正确的端口,但它从不向客户端返回数据。
要进行重现,请在项目根目录中打开一个终端,然后:
make && ./bin/console这将引导tftp_hellp应用程序,并将您放入erlang shell。确认inets正在运行:
1> application:which_applications().
[{inets,"INETS CXC 138 49","5.9"},
{sasl,"SASL CXC 138 11","2.2.1"},
{stdlib,"ERTS CXC 138 10","1.18.1"},
{kernel,"ERTS CXC 138 10","2.15.1"}]并且tftp守护进程正在运行:
2> inets:services().
[{tftpd,<0.56.0>},{httpc,<0.50.0>}]太棒了。现在,如果你查看etc/inets.config,你会注意到我们将tftpd绑定到6969。打开另一个终端,然后:
> tftp localhost 6969
tftp> get hello.txt
Transfer timed out.麻烦了。如果我对tftpd的理解是正确的--显然不是这样的--我们就能让<<"hello world">>回来。
我做错了什么?
发布于 2012-07-31 01:44:45
我最初收到了相同的错误,但随后检查了我的防火墙设置以允许udp/6969,并获得了文件:
-> % tftp localhost 6969
tftp> get hello.txt
Received 11 bytes in 0.0 seconds
tftp> quit
-> % cat hello.txt
hello world%
https://stackoverflow.com/questions/11695771
复制相似问题