mirror of
https://github.com/markqvist/rnsh.git
synced 2025-07-25 07:55:23 -04:00
Use StreamDataMessage from RNS.Buffer
But don't use Buffer yet
This commit is contained in:
parent
5e97dc372e
commit
53332bf1ac
2 changed files with 5 additions and 22 deletions
rnsh
|
@ -210,7 +210,7 @@ class ListenerSession:
|
|||
elif not self.channel.is_ready_to_send():
|
||||
return False
|
||||
elif len(self.stderr_buf) > 0:
|
||||
mdu = self.channel.MDU - protocol.StreamDataMessage.OVERHEAD
|
||||
mdu = protocol.StreamDataMessage.MAX_DATA_LEN
|
||||
data = self.stderr_buf[:mdu]
|
||||
self.stderr_buf = self.stderr_buf[mdu:]
|
||||
send_eof = self.process.stderr_eof and len(data) == 0 and not self.stderr_eof_sent
|
||||
|
@ -222,7 +222,7 @@ class ListenerSession:
|
|||
self.stderr_eof_sent = True
|
||||
return True
|
||||
elif len(self.stdout_buf) > 0:
|
||||
mdu = self.channel.MDU - protocol.StreamDataMessage.OVERHEAD
|
||||
mdu = protocol.StreamDataMessage.MAX_DATA_LEN
|
||||
data = self.stdout_buf[:mdu]
|
||||
self.stdout_buf = self.stdout_buf[mdu:]
|
||||
send_eof = self.process.stdout_eof and len(data) == 0 and not self.stdout_eof_sent
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue