tailhook / rotor-http

The mio/rotor based http server library for rust (UNMAINTAINED, use tk-http)
MIT License
110 stars 11 forks source link

Persistent Connections #44

Closed KodrAus closed 8 years ago

KodrAus commented 8 years ago

Is it possible to write persistent HTTP connections with rotor_http? I'm still pretty new to the library so am not sure how that would play with the state functions on the Client. Could it just be a case of passing an already open socket to the Requester object?

tailhook commented 8 years ago

Sure:

  1. Here is the example how to create a connection
  2. The code to create a request, which we call on a timeout (sending requests in a time intervals) and wakeup (sending request now)
KodrAus commented 8 years ago

Ah great, thanks! I'll dig through your implementation