How to connect to fdasfds

I want to make a socket connection to a remove server. How can I do that?

I’m aware of ranch and tcp_gen. Can I use those at all to connect to a remote server via a socket?

Just a raw tcp socket? try gen_tcp

4 Likes

ranch is for accepting connections. gen_tcp is what you need.

2 Likes

and gen_udp too?

gen_udp would work for udp and unix sockets.