summaryrefslogtreecommitdiff
path: root/src/client/app/common/scripts/streaming/requests.ts
blob: 5bec30143ff80fd1ffd7dda1ef7e070c9984be55 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import Stream from './stream';
import StreamManager from './stream-manager';
import MiOS from '../../mios';

/**
 * Requests stream connection
 */
export class RequestsStream extends Stream {
	constructor(os: MiOS) {
		super(os, 'requests');
	}
}

export class RequestsStreamManager extends StreamManager<RequestsStream> {
	private os: MiOS;

	constructor(os: MiOS) {
		super();

		this.os = os;
	}

	public getConnection() {
		if (this.connection == null) {
			this.connection = new RequestsStream(this.os);
		}

		return this.connection;
	}
}