Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port the Snapdrop server to Rust #512

Open
RobinLinus opened this issue Oct 12, 2022 · 6 comments · May be fixed by #521
Open

Port the Snapdrop server to Rust #512

RobinLinus opened this issue Oct 12, 2022 · 6 comments · May be fixed by #521

Comments

@RobinLinus
Copy link
Collaborator

Is someone interested to translate the Snapdrop server to Rust?

@crapStone
Copy link

If it's just the one file i could give it a try this weekend.

@RobinLinus
Copy link
Collaborator Author

RobinLinus commented Oct 22, 2022

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.

@crapStone
Copy link

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

@RobinLinus
Copy link
Collaborator Author

RobinLinus commented Oct 22, 2022

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.

@crapStone
Copy link

That was my idea too. I hope I have to work on it again later today.

@crapStone crapStone linked a pull request Oct 25, 2022 that will close this issue
5 tasks
@crapStone
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants