Skip to content

Use a better algorithm in async jsws using streams #5

Open
@kranfix

Description

@kranfix

Here there is an example to implement the async web server in JS.
https://nodejs.org/en/knowledge/advanced/streams/how-to-use-fs-create-read-stream/

Currently, the server works this way with promises only:

file: aaaAAAAaaaAAaaaa
res: --------------------bbbBBBBbbbBBbbbb

But, it would be better this way with steam:

file: aaaAAAAaaaAAaaaa
res: ---bbbBBBBbbbBBbbbb

The same idea can be applied to Rust, for example.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions