export abstract class TTransport { public static receiver ( data ) { throw new Error ( 'Not implemented' ) ; } protected buffer : Buffer ; protected requestId : number | null ; constructor ( buffer ) { this . buffer = buffer ; this . requestId = null ; } public abstract remaining ( ) ; public abstract commitPosition ( ) ; public abstract rollbackPosition ( ) ; public abstract consume ( len ) ; public abstract isOpen ( ) ; public abstract open ( ) ; public abstract close ( ) ; public abstract read ( len ) ; public abstract readByte ( ) ; public abstract readI16 ( ) ; public abstract readI32 ( ) ; public abstract readDouble ( ) ; public abstract readString ( len ) ; public abstract readAll ( ) ; /**
     * Writes buffer to the output
     */ public abstract write ( buf ) ; /**
     * Flush any pending data out of a transport buffer
     */ public abstract flush ( ) ; }