1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-01 19:42:48 -05:00

Configurable TCP_NODELAY option on network connections

[originally from svn r1428]
This commit is contained in:
Simon Tatham
2001-11-29 21:47:11 +00:00
parent 43a4339ac5
commit 3270c74f9e
15 changed files with 47 additions and 20 deletions

View File

@ -735,8 +735,11 @@ int main(int argc, char **argv)
{
char *error;
char *realhost;
/* nodelay is only useful if stdin is a character device (console) */
int nodelay = cfg.tcp_nodelay &&
(GetFileType(GetStdHandle(STD_INPUT_HANDLE)) == FILE_TYPE_CHAR);
error = back->init(cfg.host, cfg.port, &realhost);
error = back->init(cfg.host, cfg.port, &realhost, nodelay);
if (error) {
fprintf(stderr, "Unable to open connection:\n%s", error);
return 1;