[erlang-questions] How to build telnet client in Erlang?

Jason Chuh zhuqling@REDACTED
Thu Aug 15 07:45:39 CEST 2013


How about ct_telnet? http://www.erlang.org/doc/man/ct_telnet.html


2013/8/15 李超 <leechau@REDACTED>

> Hi, guys,
>
> I am new for Erlang and I wonder if there are any libraries providing APIs
> like:
>
>     Handle = telnet_module:connect(Ip, Port, Username, Password).
>     {ok, Msg} = telnet_module:send(Handle, Command).
>     {ok, close} = telnet_module:close(Handle).
>
> Someone recommends ct_telnet, but this module seems mainly for test
> purpose (common test?) and associated closely with eunit. And I can't find
> any documents about how to configure the target server(including ip, port,
> username, password, etc.). Some examples show they are specified in a
> configuration file, but I am not quite sure.
>
> < /div>
> There is also a getty.erl (
> http://ftp.sunet.se/pub/lang/erlang/examples/small_examples/getty.erl),
> but I find it is actually a tcp server and has nothing to do with
> connecting to a telnet server.
>
> Maybe I can use "telnet" command of shell as the client and use
> open_port/port_command/port_close to communicate with remote peer?
>
> Thanks a lot!
>
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20130815/1fae568f/attachment.htm>


More information about the erlang-questions mailing list