Skip to content

[Extension idea] WebSocket extension improvements #2037

Open
@Xeltalliv

Description

@Xeltalliv

The current WebSocket extension isn't very good in terms of functionality, and while currently there is a PR for another better extension, it still doesn't resolve all of the issues. I think the hypothetical complete WebSocket extension could be a lot better.

In my opinion, if the complete extension existed, it should have those features:

  1. Have a system for working with multiple connections at once.
  2. Have a way to listen on ports and act as a server (would only work in TW Desktop/packaged for obvious reasons). Just like multiple connections, this should support multiple listeners at once. Once connection establishes, both the client and the server should be able to treat the connection in the same way and use the same blocks to interact with it.
  3. Have a way to create, send, receive and parse binary messages. I think for constructing binary messages, the easiest solution to work with would be to sequentially concatenate values of specified types. And reading should be done similarly, where user specifies which type to read, it reads the correct amount of bytes, and steps forward by that amount of bytes, ready for the next read. Also there could be a way to "seek" to some specified offset. And for including text in binary messages, there should also be some way to use javascript's TextEncoder and TextDecoder.

Giving the ideas, because probably no-one other the GarboMuffin can do the electron<->nodejs communication part in a proper way.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions