This commit is contained in:
syuilo
2018-03-15 19:53:46 +09:00
parent f02fcd0e2a
commit 1439c3245b
22 changed files with 446 additions and 101 deletions

View File

@@ -1,19 +1,28 @@
import Stream from './stream';
import StreamManager from './stream-manager';
import MiOS from '../../mios';
/**
* Server stream connection
*/
export class ServerStream extends Stream {
constructor() {
super('server');
constructor(os: MiOS) {
super(os, 'server');
}
}
export class ServerStreamManager extends StreamManager<ServerStream> {
private os: MiOS;
constructor(os: MiOS) {
super();
this.os = os;
}
public getConnection() {
if (this.connection == null) {
this.connection = new ServerStream();
this.connection = new ServerStream(this.os);
}
return this.connection;