Erlang socket client

Tue May 31 22:32:58 CEST 2005

On Tue, May 31, 2005 at 03:56:49PM -0400, tty@REDACTED wrote:
> Hello,
> I have a remote server (not in Erlang) controlling a hardware device. This server takes plain text commands and echo the command and device responses back. I can connect to it using a simple telnet and interact with the hardware.
> However when I tried writting an Erlang client all I receive is the echoed command. Even if my client is set to {active, false} and I do the gen_tcp:recv myself I do not obtain the device response. 
> Does anyone have a sample Erlang telnet client or have ideas on how I can go about interacting with this server. 

If you can interact with the server using telnet, you can
surely and easily interact with it using regular erlang
You're probably doing some simple mistake, maybe the server
expects \r\n terminated lines ?? or someuch ??

All {active, X} modes will work just fine.

Give us an example of a good telnet session and 
an example of a bad gen_tcp:connect() session from the
erlang shell.


Claes Wikstrom                        -- Caps lock is nowhere and                  -- everything is under control          

More information about the erlang-questions mailing list