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

callback for send #7

Open
mvayngrib opened this issue May 19, 2015 · 5 comments
Open

callback for send #7

mvayngrib opened this issue May 19, 2015 · 5 comments

Comments

@mvayngrib
Copy link
Contributor

would be nice to be able to do something like this:

client.send(data, function() {
// the packets this data was split up into have all been acknowledged
})

@shovon
Copy link
Owner

shovon commented May 19, 2015

True. Will take a look into it.

@shovon
Copy link
Owner

shovon commented May 19, 2015

Kind of off-topic, but have you used promises? If so, what are your thoughts?

I'm asking because I'm considering having the library return promises for a lot of the async calls. Not for all library calls, but definitely client.send.

@mvayngrib
Copy link
Contributor Author

I use promises a lot actually...maybe too much. They're good, but I'm not sure I love them as much as I used to.

what would be cool, is being able to pipe to and from an rudp client:

var client = new rudp.Client(socket, address, port)
process.stdin.pipe(client)
client.pipe(process.stdout)
// and of course duplex mode
socket.pipe(client).pipe(socket)

then you could basically use it as a tcp socket

@mvayngrib
Copy link
Contributor Author

while we're on the subject of cool things, one more would be a pollyfill of node's "net" module over rudp. Then you can plug it right into something like webtorrent and use udp for everything

@shovon
Copy link
Owner

shovon commented May 19, 2015

Good idea.

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

No branches or pull requests

2 participants