File tree Expand file tree Collapse file tree 3 files changed +19
-9
lines changed Expand file tree Collapse file tree 3 files changed +19
-9
lines changed Original file line number Diff line number Diff line change @@ -116,9 +116,9 @@ import * as L from "@litert/core";
116116
117117 console . log ( JSON . stringify ( await pipeline . exec ( ) , null , 2 ) ) ;
118118
119- await pipeline . shutdown ( ) ;
119+ await pipeline . close ( ) ;
120120
121- await cli . shutdown ( ) ;
122- await sub . shutdown ( ) ;
121+ await cli . close ( ) ;
122+ await sub . close ( ) ;
123123
124124} ) ( ) ;
Original file line number Diff line number Diff line change @@ -58,14 +58,26 @@ export interface IProtocolClient extends $Events.IObservable<IProtocolClientEven
5858
5959 readonly status : EClientStatus ;
6060
61+ /**
62+ * Start a connection to remote server..
63+ */
6164 connect ( ) : Promise < void > ;
6265
6366 connect ( callback : ICallbackA < void > ) : void ;
6467
65- shutdown ( ) : Promise < void > ;
68+ /**
69+ * Close the connection to remote server..
70+ */
71+ close ( ) : Promise < void > ;
6672
67- shutdown ( callback : ICallbackA < void > ) : void ;
73+ close ( callback : ICallbackA < void > ) : void ;
6874
75+ /**
76+ * Send a command to remote server.
77+ *
78+ * @param cmd The command
79+ * @param args The arguments of the command.
80+ */
6981 command ( cmd : string , args : TStringValue [ ] ) : Promise < any > ;
7082
7183 command ( cmd : string , args : TStringValue [ ] , callback : ICallbackA ) : void ;
@@ -104,9 +116,7 @@ export enum DataType {
104116 NULL
105117}
106118
107- export type ListItem < T = any > = [
108- DataType , T
109- ] ;
119+ export type ListItem < T = any > = [ DataType , T ] ;
110120
111121/**
112122 * This interface describes the structure of a Redis protocol encoder.
Original file line number Diff line number Diff line change @@ -401,7 +401,7 @@ implements C.IProtocolClient {
401401 } ) ;
402402 }
403403
404- public shutdown ( cb ?: C . ICallbackA < void > ) : any {
404+ public close ( cb ?: C . ICallbackA < void > ) : any {
405405
406406 return wrapPromise ( ( callback ) : void => {
407407
You can’t perform that action at this time.
0 commit comments