Search
 
SCRIPT & CODE EXAMPLE
 

TYPESCRIPT

socket.io handshake return error "Transport unknown"

// 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 :: array contains typescript 
Typescript :: mysqli_fetch_array() expects parameter 1 to be mysqli_result 
Typescript :: mat-form-field email validation 
Typescript :: window typescript 
Typescript :: communication between components in angular 
Typescript :: React & TypeScript Chrome Extension Development [2021] 
Typescript :: apexcharts colors function 
Typescript :: typescript enum to string 
Typescript :: typescript get object value 
Typescript :: google sheets add all numbers in a column with condition 
Typescript :: functional testing types? 
Typescript :: angular jasmine mock http request 
Typescript :: wordpress get_posts custom posts by meta key 
Typescript :: dictionary comprehension using while copying elements from another dictionary in python 
Typescript :: typscript node-ts with nodemon 
Typescript :: throw error typescript 
Typescript :: styled-components error in typescript 
Typescript :: angular 13 component example 
Typescript :: how to convert millisecond to second to date momentjs 
Typescript :: firestore cloud function update documents 
Typescript :: adding two lists using lambda function 
Typescript :: extend typescript 
Typescript :: react typescript create react app 
Typescript :: pcmanfm ubuntu 
Typescript :: how push objects into a local stotage array 
Typescript :: nest js parseint pipe 
Typescript :: typescript generic function 
Typescript :: how to count digits in python 
Typescript :: add bullet points in text widget flutter 
Typescript :: class-validator not working nest-typescript-starter 
ADD CONTENT
Topic
Content
Source link
Name
8+9 =