first commit
This commit is contained in:
commit
8eb4fcf055
100 changed files with 28695 additions and 0 deletions
16
src/index.ts
Normal file
16
src/index.ts
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import { createChannel, Channel, ChannelOptions } from 'nice-grpc';
|
||||
|
||||
import { HandlerService } from './services';
|
||||
|
||||
export class XrayClient {
|
||||
public readonly channel: Channel;
|
||||
public readonly handler: HandlerService;
|
||||
|
||||
constructor(ip: string, port: string, options?: ChannelOptions) {
|
||||
this.channel = createChannel(`${ip}:${port}`, undefined, {
|
||||
...options,
|
||||
});
|
||||
this.handler = new HandlerService(this.channel);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue