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?
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
ranch is for accepting connections. gen_tcp
is what you need.
and gen_udp too?
gen_udp would work for udp and unix sockets.