I’m trying to make my Iron server public(to be accessable by my machine’s ip) and found that std::net::TcpStream could help me as : it is
A structure which represents a TCP stream between a local socket and a remote socket according to the documentation. So i ve got next:
let mut con=TcpStream::connect(“126.96.36.199:8181”).unwrap();
^^^^ the trait
std::net::ToSocketAddrs is not implemented for
According to the compiler i have to impl ToSocketAddrs for TcpStream
but ive got lost trying to do it.
Can anyone help me out with it?
And is this approach correct in achieving the goal?