Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: socketio/socket.io
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 4.0.2
Choose a base ref
...
head repository: socketio/socket.io
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 4.1.0
Choose a head ref
  • 5 commits
  • 16 files changed
  • 1 contributor

Commits on May 10, 2021

  1. perf: add support for the "wsPreEncoded" writing option

    Packets that are sent to multiple clients will now be pre-encoded for
    the WebSocket transport (which means simply prepending "4" - which is
    the "message" packet type in Engine.IO).
    
    Note: buffers are not pre-encoded, since they are sent without
    modification over the WebSocket connection
    
    See also: socketio/engine.io@7706b12
    
    engine.io diff: socketio/engine.io@5.0.0...5.1.0
    darrachequesne committed May 10, 2021
    Configuration menu
    Copy the full SHA
    dc381b7 View commit details
    Browse the repository at this point in the history
  2. feat: add support for inter-server communication

    Syntax:
    
    ```js
    // server A
    io.serverSideEmit("hello", "world");
    
    // server B
    io.on("hello", (arg) => {
      console.log(arg); // prints "world"
    });
    ```
    
    With acknowledgements:
    
    ```js
    // server A
    io.serverSideEmit("hello", "world", (err, responses) => {
      console.log(responses); // prints ["hi"]
    });
    
    // server B
    io.on("hello", (arg, callback) => {
      callback("hi");
    });
    ```
    
    This feature replaces the customHook/customRequest API from the Redis
    adapter: socketio/socket.io-redis-adapter#370
    darrachequesne committed May 10, 2021
    Configuration menu
    Copy the full SHA
    93cce05 View commit details
    Browse the repository at this point in the history
  3. feat: notify upon namespace creation

    A "new_namespace" event will be emitted when a new namespace is created:
    
    ```js
    io.on("new_namespace", (namespace) => {
      // ...
    });
    ```
    
    This could be used for example for registering the same middleware for
    each namespace.
    
    See #3851
    darrachequesne committed May 10, 2021
    Configuration menu
    Copy the full SHA
    499c892 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    95d9e4a View commit details
    Browse the repository at this point in the history

Commits on May 11, 2021

  1. chore(release): 4.1.0

    darrachequesne committed May 11, 2021
    Configuration menu
    Copy the full SHA
    fb6b0ef View commit details
    Browse the repository at this point in the history
Loading