Closed A-KL closed 8 years ago
Do you want it over HTTP or another protocol?
Yes, I want to send jpeg data (frames from web camera) over HTTP as multipart content. I discovered that it possible with your library but in opposite direction - receive data and save it directly to the physical file.
So I started with implementation of Serialize
method at MultipartSerializer
. However I still have no idea how to re-implement Response.Body
to able to transfer endless sequence of data and not fixed size messages.
I think you need to implement your own HttpMessageEncoder
which ignores the fixed size.
Here is a gzip implementation I wrote which automatically gzips the message and sends it in chunks to reduce memory usage on the server: https://gist.github.com/campersau/149a4569e57f3010f054399e7c3e0ec2 Maybe this helps you to implement your own.
@campersau thank you! I'll have a look.
@campersau: Feel free to add a pull request
Did you get it to work?
I work on IoT project (Windows 10 IoT Core \ UWP) and trying to build MJpeg live video-streaming service.
After I went through your code it is still looks quite tricky to me. Basically I just need the way to get down to tcp connection on incoming request and together with response headers start sending mjpeg frames.
Here is an example of simple mjpeg streaming using Web.API which I'm trying to implement using your framework.
What is your opinion on this? Could you please point me where to start? Do I need to implement own listener or I can reuse
HttpListener
, but with a new encoder?