increased PTY client output buffer size
Corrected error checking for reading output from the client while at it.
This commit is contained in:
parent
69d750b6ed
commit
d01917c82d
|
@ -87,9 +87,9 @@ namespace krikkel::NCursesPtyWindow
|
|||
|
||||
void NCursesPtyWindow::readFromPtyClient()
|
||||
{
|
||||
size_t bytesRead = read(fdPtyHost, clientOutputBuffer, CLIENT_OUTPUT_BUFFER_SIZE);
|
||||
if(bytesRead)
|
||||
vterm_input_write(pseudoTerminal, clientOutputBuffer, bytesRead);
|
||||
size_t bytesRead = read(fdPtyHost, ptyClientOutputBuffer, PTY_CLIENT_OUTPUT_BUFFER_SIZE);
|
||||
if(bytesRead != -1 && bytesRead != 0)
|
||||
vterm_input_write(pseudoTerminal, ptyClientOutputBuffer, bytesRead);
|
||||
}
|
||||
|
||||
VTermScreenCallbacks NCursesPtyWindow::screenCallbacks =
|
||||
|
|
|
@ -37,8 +37,8 @@ namespace krikkel::NCursesPtyWindow
|
|||
VTermScreen *pseudoTerminalScreen;
|
||||
static VTermScreenCallbacks screenCallbacks;
|
||||
/// @todo one line is at most 4096 chars long
|
||||
static const u_int CLIENT_OUTPUT_BUFFER_SIZE = 512;
|
||||
char clientOutputBuffer[CLIENT_OUTPUT_BUFFER_SIZE];
|
||||
static const size_t PTY_CLIENT_OUTPUT_BUFFER_SIZE = 8192;
|
||||
char ptyClientOutputBuffer[PTY_CLIENT_OUTPUT_BUFFER_SIZE];
|
||||
uint16_t cursorX, cursorY;
|
||||
|
||||
std::thread readPtyClientThread;
|
||||
|
|
Loading…
Reference in a new issue