Giter VIP home page Giter VIP logo

unisonhttp's People

Contributors

nipsuli avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

hestuthekorok

unisonhttp's Issues

Road to v0.1

Here's some of my ideas what I'd like to do before tagging this library with any version, now I just push everything to the master, so not giving any guarantees on stability. After these changes I'm planning to be good citizen and follow semantic versioning :)

So to the point. Basically this library consists of two parts: 1. talking with socket, and 2. parsing Bytes to HttpRequest and HttpResponse objects and converting those back to bytes.

Currently the parser first parses Bytes first into Text and then does the HTTP parsing, while this was good approach for practising how to write HTTP parser, it's IMO bit limiting, e.g. in case of returning a file from disk as a response. Thus I was thinking on changing body in the HttpResponse and HttpRequest to be Bytes instead of Optional Text.

Then naturally we can implement on top of that something like TextResponse and HttpRequest.bodyText. But the underlying data structures would contain body as Bytes.

I guess after spending time reading RFC 2616 and implementing the text parsing of this, I guess this shouldn't be too hard. Just need to reimplement fromBytes and toBytes to handle bytes directly.

As the basic objects will change, this will be breaking change and main thing I want to build before tagging this to any versioning.

Another thing that I've been thinking is to implement multi threaded server, so that main thread would only wait in io.accept and when connection is created pass that socket to thread to handle the rest. But as this is more just new feature instead of breaking change like the HttpRequest HttpResponse I might leave that out from this iteration.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.