void Engine::read_socket(DataInputStream & network_in) { if( BIO_pending(bioIn) > 64*1024 ) // Enough for 4 ssl packets return; Data data; if( network_in.read(data) == 0 ) return; wLog("sock.read: %d", data.getSize()); int len = BIO_write(bioIn, data.getData(), data.getSize()); // Consumes everything by docs wLog("BIO_write: %d", len); }
int network_information_table_section::readNoHeader(DataInputStream& istream ) { // throws IOException int retVal = 0; // bf2 bf2= istream.readUI8(); retVal += 1; // subtableInstance { ui8* ba= new ui8[tableHeader->getSection_length()+(-5)]; int iCount = istream.read(ba,tableHeader->getSection_length()+(-5)); ByteArrayDataInputStream* bais= new ByteArrayDataInputStream(ba,0,iCount ); retVal += subtableInstance->read(*bais); delete bais; } // CRC { CRC=istream.readUI32() ; retVal+=4; } return retVal; }