gen_udp:send/4

Ulf Wiger etxuwig@REDACTED
Thu May 18 10:58:12 CEST 2000


On Thu, 18 May 2000 Pekka.Hedqvist@REDACTED wrote:

>Open the port as a binary. 
>1> {ok, S} = gen_udp:open(6789,[binary]).
>5> gen_udp:send(S, "localhost", 7000, term_to_binary(({1, 2, 3, four})))
>
>and on the other end you get the udp packet and do a term_to_binary


... oops, typo. It should of course be binary_to_term ...


>and then voila you get back {1,2,3,four}. Of course if Erlang is not
>on the other end you need to use some other external data representation
>etc..
>
>/pekka

-- 
Ulf Wiger, Chief Designer AXD 301         <ulf.wiger@REDACTED>
Ericsson Telecom AB                          tfn: +46  8 719 81 95
Varuvägen 9, Älvsjö                          mob: +46 70 519 81 95
S-126 25 Stockholm, Sweden                   fax: +46  8 719 43 44




More information about the erlang-questions mailing list