Search
 
SCRIPT & CODE EXAMPLE
 

TYPESCRIPT

transport unknown socket.io

// you must use same version socket.io between server and client

// socket client
const host: string = 'http://localhost:4000'
const socket: Socket = socketClient(host, {
  transports: ['websocket'],
  agent: true,
  withCredentials: true,
  timeout: 20000 * 2,
  reconnectionDelayMax: 5000 * 2,
  reconnectionDelay: 1000 * 5
})

// socket server
this.io = new SocketServer(this.server, {
  cors: { origin: '*', credentials: true },
  allowEIO3: true,
  maxHttpBufferSize: 1000000,
  pingTimeout: 20000 * 2,
  pingInterval: 25000 * 2,
  upgradeTimeout: 10000 * 2,
  transports: ['websocket']
 })
Comment

PREVIOUS NEXT
Code Example
Typescript :: advantages of automation 
Typescript :: type script encode url 
Typescript :: react-native.ps1 cannot be loaded because running scripts is disabled on this system 
Typescript :: typescript ge t current screen resolution 
Typescript :: copy object in typescript 
Typescript :: list all commits before rebase 
Typescript :: Check restore percentage tsql 
Typescript :: google fonts for flutte 
Typescript :: form control adding disabled and validators 
Typescript :: linux host file location 
Typescript :: concat string typescript 
Typescript :: typescript object key enum 
Typescript :: convert list to list of lists on every n elements python 
Typescript :: add digits java 
Typescript :: how to check if there is any point which lies inside the circle 
Typescript :: select column values from array typescript 
Typescript :: how to declare an empty array in typescript 
Typescript :: typescript with babel 
Typescript :: google fonts icons size classes 
Typescript :: enable anchor scrolling angular 
Typescript :: typescript get the time moment 
Typescript :: type casting in typescript 
Typescript :: extending an interface in typescript 
Typescript :: typescript get full path of file 
Typescript :: path expo 
Typescript :: pass data through router angular 
Typescript :: mailto multiple recipients to cc 
Typescript :: listobjects vba 
Typescript :: typescript get the promise return type 
Typescript :: create CSS class in directive angular 
ADD CONTENT
Topic
Content
Source link
Name
4+8 =