Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

371
Visualizações
Websocket: there are 2 connections in chrome devtools?

In chrome (js client), after connect to backend (golang) via websocket, I saw 2 connections in chrome devtools:

  1. Frist connection, shows request url as: ws://localhost:3000/, and 3000 is the port of my frontend UI.
    messages:
    • a single connected message
    • a serial of ping message (every 30 seconds).
  2. Second connection, shows request url as ws://localhost:18081/api/v1/.., and 18081 is the port of my websocket backend.
    messages:
    • the read/write messages that client/server send to each other, by programmer.

The questions are:

  • How many websocket connections are there between the js browser client & go server?
    I suppose there is only 1.
  • If there is only 1, why chrome devtools shows it as 2 connections?
    Or, chrome just shows them separately for easier debug?

Update (about the frontend framework)

The frontend uses svelte-kit, which in turn use vite, not sure does that matter?

about 4 years ago · Santiago Gelvez
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda