aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/extra-utils/socket/socket-io.ts
blob: 4ca93f453ed241020b9a9e199996813a865af595 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import { io } from 'socket.io-client'

function getUserNotificationSocket (serverUrl: string, accessToken: string) {
  return io(serverUrl + '/user-notifications', {
    query: { accessToken }
  })
}

function getLiveNotificationSocket (serverUrl: string) {
  return io(serverUrl + '/live-videos')
}

// ---------------------------------------------------------------------------

export {
  getUserNotificationSocket,
  getLiveNotificationSocket
}