Closed ParadoxSpiral closed 5 years ago
@ParadoxSpiral is this async
or sync
? I think you can access the raw stream for sync
and I believe there is a combinator for the async
stuff, but it's good to add a convenience function.
oh I misread your issue, I see it now and I'll add it.
I do this now with a Timer with the async client for anyone who wants to do the same, but I still think that this would be a nice addition.
I would also like to see a configurable timeout without messing with timer futures :)
@ParadoxSpiral can you share your code for using a timer on an async client?
@WyseNynja I use this timeout combinator from tokio.
Since there are other async utilities to achieve this I don't think it is necessary to add this feature, closing for now.
Since there are other async utilities to achieve this I don't think it is necessary to add this feature, closing for now.
I think you can make this timeout
as a param in sync
ClientBuilder, just like:
ClientBuilder::new(url, options{timeout: 500})
Currently you cannot seem to do this, so connecting to e.g. wss://1.1.1.1 takes ~2m30s. I use ws urls from user input, so it would be nice to be able to specify a timeout for the inital connecting.