]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - shared/extra-utils/socket/socket-io.ts
Use dns cache for requests
[github/Chocobozzz/PeerTube.git] / shared / extra-utils / socket / socket-io.ts
CommitLineData
fce7fe04 1import { io } from 'socket.io-client'
cef534ed
C
2
3function getUserNotificationSocket (serverUrl: string, accessToken: string) {
4 return io(serverUrl + '/user-notifications', {
5 query: { accessToken }
6 })
7}
8
bd54ad19
C
9function getLiveNotificationSocket (serverUrl: string) {
10 return io(serverUrl + '/live-videos')
11}
12
cef534ed
C
13// ---------------------------------------------------------------------------
14
15export {
bd54ad19
C
16 getUserNotificationSocket,
17 getLiveNotificationSocket
cef534ed 18}