Erlang/OTP Forums

Author Message

<  Advanced Erlang/OTP  ~  Unix Sockets

sou
Posted: Fri Jun 29, 2007 8:31 am Reply with quote
Joined: 19 Jun 2007 Posts: 5
Hi,

can you tell me how to handle unix sockets via erlang?
I couldn't find any resources/information. Rolling Eyes

Thanks Very Happy
View user's profile Send private message
francesco
Posted: Sat Jun 30, 2007 10:35 am Reply with quote
User Joined: 07 Jul 2006 Posts: 249 Location: London
Ports are handled through the port built in functions. They are documented in the erlang manual page, the module BIFs are by default said to belong to. An interoperability tutorial is here: http://erlang.org/doc/tutorial/c_port.html

And a how to which should help you get it right the first time around is here:
http://www.trapexit.org/index.php/Writing_an_Erlang_Port_using_OTP_Principles

I hope the above helps.

Francesco
View user's profile Send private message Visit poster's website
tobbe
Posted: Tue Jul 03, 2007 5:28 am Reply with quote
User Joined: 19 Jan 2005 Posts: 274 Location: Stockholm, Sweden
I guess it is the module gen_tcp you're looking for (or gen_udp).

--Tobbe
View user's profile Send private message Send e-mail Visit poster's website
francesco
Posted: Tue Jul 03, 2007 6:37 am Reply with quote
User Joined: 07 Jul 2006 Posts: 249 Location: London
We did debate in the office if it was ports or sockets you were asking for. The gen_tcp manual page is here:

http://erlang.org/doc/man/gen_tcp.html
View user's profile Send private message Visit poster's website

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum