Port the Snapdrop server to Rust
Is someone interested to translate the Snapdrop server to Rust?
If it's just the one file i could give it a try this weekend.
Looks like this is already quite close to the Snapdrop server. https://github.com/seanmonstar/warp/blob/master/examples/websockets_chat.rs
Is someone here familiar with warp and knows how to get a client's ip? I dug into it shortly but it looked complicated, so I thought I'm doing it wrong and there must be a simpler way.
This was my start last week, but unfortunately, I didn't have much time: https://github.com/crapstones-forks/snapdrop/blob/feature/rust-server/server-rs/src/main.rs
Thank you @crapStone ! tokio-tungstenite looks like a good alternative to warp. Looks like you can simply access the client's IP from the TcpStream object.
That was my idea too. I hope I have to work on it again later today.
I just opened a preliminary PR. It still takes a lot of work to be on par with the original implementation, but I wanted to track the progress and give you a chance to give feedback.