Skip to content

Commit

Permalink
Socket-passthrough
Browse files Browse the repository at this point in the history
  • Loading branch information
PurpShell authored Sep 28, 2023
1 parent cd8542f commit f50842f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Socket/socket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export const makeSocket = (config: SocketConfig) => {
url = new URL(`tcp://${MOBILE_ENDPOINT}:${MOBILE_PORT}`)
}

const ws = config.mobile ? new MobileSocketClient(url, config) : new WebSocketClient(url, config)
const ws = config.socket ? config.socket : config.mobile ? new MobileSocketClient(url, config) : new WebSocketClient(url, config)

ws.connect()

Expand Down
2 changes: 2 additions & 0 deletions src/Types/Socket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,4 +115,6 @@ export type SocketConfig = {
getMessage: (key: proto.IMessageKey) => Promise<proto.IMessage | undefined>

makeSignalRepository: (auth: SignalAuthState) => SignalRepository

socket: any
}

0 comments on commit f50842f

Please sign in to comment.