private void writeToNetwork ( EngineConnection engineConnection ) { final String methodName = "writeToNetwork" ; logger . entry ( this , methodName , engineConnection ) ; if ( engineConnection . transport . pending ( ) > 0 ) { ByteBuffer head = engineConnection . transport . head ( ) ; int amount = head . remaining ( ) ; engineConnection . channel . write ( head , new NetworkWritePromiseImpl ( this , amount , engineConnection ) ) ; engineConnection . transport . pop ( amount ) ; engineConnection . transport . tick ( System . currentTimeMillis ( ) ) ; } logger . exit ( this , methodName ) ; }
Drains any pending data from a Proton transport object onto the network