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





                                                                             


                                                        

                                                                              
                            
 
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
}