aboutsummaryrefslogblamecommitdiffhomepage
path: root/shared/extra-utils/socket/socket-io.ts
blob: 66099464f990a0d5fdf8bf0c34847f1233185f81 (plain) (tree)
1
2
3
4
5
6
7
8







                                                                             



                                                        


                                                                              

                            
 
import * as 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
}