Skip to content

Socket Connection issue #11

@harshitrathod1

Description

@harshitrathod1
  1. My first question is : your socket.js is present in routes - pages/api/socket.js and client code inside pages/api/chat/index.jsx, great.

But while client making connection to same socket server why is preflight request at endpoint /api/socket and actual socket connection happening /socket how does the client know about this?

Image

Image

  1. Does the same configuration works after building the project i.e. after next build and next start? Also not polling but actual websockets?

Thanks appreciate your help here

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