MCPcopy Create free account
hub / github.com/mininet/mininet / readline

Method readline

mininet/node.py:259–268  ·  view source on GitHub ↗

Buffered readline from node, potentially blocking. returns: line (minus newline) or None

( self )

Source from the content-addressed store, hash-verified

257 return result
258
259 def readline( self ):
260 """Buffered readline from node, potentially blocking.
261 returns: line (minus newline) or None"""
262 self.readbuf += self.read( 1024 )
263 if '\n' not in self.readbuf:
264 return None
265 pos = self.readbuf.find( '\n' )
266 line = self.readbuf[ 0: pos ]
267 self.readbuf = self.readbuf[ pos + 1: ]
268 return line
269
270 def write( self, data ):
271 """Write data to node.

Callers 7

do_sourceMethod · 0.80
monitorMethod · 0.80
pmonitorFunction · 0.80
sysctlTestAndSetFunction · 0.80
bwtestFunction · 0.80
monitorFilesFunction · 0.80
getMininetVersionFunction · 0.80

Calls 1

readMethod · 0.95

Tested by

no test coverage detected