mirror of
https://github.com/Cameri/nostream.git
synced 2025-03-17 21:31:48 +01:00
feat: add getClientAddress to WebSocketAdapter
This commit is contained in:
parent
8e5646d272
commit
081e7de925
@ -13,6 +13,7 @@ export interface IWebServerAdapter extends EventEmitter {
|
||||
|
||||
export type IWebSocketAdapter = EventEmitter & {
|
||||
getClientId(): string
|
||||
getClientAddress(): string
|
||||
getSubscriptions(): Map<string, SubscriptionFilter[]>
|
||||
}
|
||||
|
||||
|
@ -72,6 +72,10 @@ export class WebSocketAdapter extends EventEmitter implements IWebSocketAdapter
|
||||
return this.clientId
|
||||
}
|
||||
|
||||
public getClientAddress(): string {
|
||||
return this.clientAddress
|
||||
}
|
||||
|
||||
public onUnsubscribed(subscriptionId: string): void {
|
||||
debug('client %s unsubscribed %s', this.clientId, subscriptionId)
|
||||
this.subscriptions.delete(subscriptionId)
|
||||
|
Loading…
x
Reference in New Issue
Block a user