comparison runtime/doc/channel.txt @ 9097:071f9da012fb

commit https://github.com/vim/vim/commit/06d2d38ab7564e1f784b1058a4ef4580cd6d1810 Author: Bram Moolenaar <Bram@vim.org> Date: Fri May 20 17:24:11 2016 +0200 Updated runtime files.
author Christian Brabandt <cb@256bit.org>
date Fri, 20 May 2016 17:30:06 +0200
parents 9305a1251e51
children bc38030aec7d
comparison
equal deleted inserted replaced
9096:e6ecaa231a5d 9097:071f9da012fb
1 *channel.txt* For Vim version 7.4. Last change: 2016 Apr 30 1 *channel.txt* For Vim version 7.4. Last change: 2016 May 19
2 2
3 3
4 VIM REFERENCE MANUAL by Bram Moolenaar 4 VIM REFERENCE MANUAL by Bram Moolenaar
5 5
6 6
144 as a string. 144 as a string.
145 145
146 For all callbacks: Use |function()| to bind it to arguments 146 For all callbacks: Use |function()| to bind it to arguments
147 and/or a Dictionary. Or use the form "dict.function" to bind 147 and/or a Dictionary. Or use the form "dict.function" to bind
148 the Dictionary. 148 the Dictionary.
149
150 Callbacks are only called at a "safe" moment, usually when Vim
151 is waiting for the user to type a character. Vim does not use
152 multi-threading.
153
149 *close_cb* 154 *close_cb*
150 "close_cb" A function that is called when the channel gets closed, other 155 "close_cb" A function that is called when the channel gets closed, other
151 than by calling ch_close(). It should be defined like this: > 156 than by calling ch_close(). It should be defined like this: >
152 func MyCloseHandler(channel) 157 func MyCloseHandler(channel)
153 < *waittime* 158 < Vim will invoke callbacks that handle data before invoking
159 close_cb, thus when this function is called no more data will
160 be received.
161 *waittime*
154 "waittime" The time to wait for the connection to be made in 162 "waittime" The time to wait for the connection to be made in
155 milliseconds. A negative number waits forever. 163 milliseconds. A negative number waits forever.
156 164
157 The default is zero, don't wait, which is useful if a local 165 The default is zero, don't wait, which is useful if a local
158 server is supposed to be running already. On Unix Vim 166 server is supposed to be running already. On Unix Vim
570 "exit_cb": handler Callback for when the job ends. The arguments are the 578 "exit_cb": handler Callback for when the job ends. The arguments are the
571 job and the exit status. 579 job and the exit status.
572 Vim checks about every 10 seconds for jobs that ended. 580 Vim checks about every 10 seconds for jobs that ended.
573 The callback can also be triggered by calling 581 The callback can also be triggered by calling
574 |job_status()|. 582 |job_status()|.
583 Note that data can be buffered, callbacks may still be
584 called after the process ends.
575 *job-timeout* 585 *job-timeout*
576 "timeout" The time to wait for a request when blocking, E.g. 586 "timeout" The time to wait for a request when blocking, E.g.
577 when using ch_evalexpr(). In milliseconds. The 587 when using ch_evalexpr(). In milliseconds. The
578 default is 2000 (2 seconds). 588 default is 2000 (2 seconds).
579 *out_timeout* *err_timeout* 589 *out_timeout* *err_timeout*