Closed yichengchen closed 8 years ago
Hey there! Thanks for raising this issue. =)
So, in principle you should be able to mount the requests adapter provided by hyper inside the Session
provided by requests-futures. However, I've never actually tried it, so you'd need to investigate.
However, the latest version of hyper is thread-safe, so if you did that you should find no specific problems.
As to APNS, what you want to do depends on whether you're working on a client or a server. If you want a client, this library is fine. If you want a server, this library won't suit: it's only a client. You'd need to go down to a lower-level library, like hyper-h2.
Thank you,that way is working. But I wonder how could i know it's using connection with streams or not.i doubt that requests-futures would close the connection after it finish single request.
By the way I'm working on a APNS client....that a mistake.LOL
@yichengchen The adapter takes care of this: it does "connection pooling" by having just a single connection per (scheme, host, port) tuple. That means that each subsequent request nonetheless goes to the same adapter.
Thanks!
I'am a beginner of Python learning. I wonder It's there any way to make a requests callback in http/2 such as requests-futures?
It would be great for me to sending and receiving message at the same time. Actually I'm trying to make a simple Apple APNS server using new http/2 Api,But I don't know how to handle things like this.
Or is there a better idea to achieve this? Thank you.