Re: adding additional network stuff in RealWaitForChar?
Brad Beveridge wrote: > On 11/09/06, Gaspar Chilingarov <[EMAIL PROTECTED]> wrote: >> Hello all vimmers! >> >> I would like to ask - how should I add additional stuff in >> RealWaitForChar? I have some network protocol, when another side >> periodically send me keepalive messages(every 10-15 secs). I would like >> to receive them and process. In GUI based vim it was pretty simple -- >> using gdk_input_add or similar thing. In other hand I would like to >> console users have same benefits - I've added handlers in >> RealWaitForChar, but ... it processes only first message on it's own. >> All latter messages are received, but does not processed -- until I >> press some key periodically, thus causing remote site timeouting and >> aborting the connection. >> >> I've implemented it in a quite similar way to FEAT_MOUSE_GPM and >> USE_XSMP implementations. >> >> What can I miss there? Any recommendations where to look? >> >> Thanks in advance, Gaspar > > There is a patched Vim7 here > (http://theclapp.org/repos/vim70+async+ecl/) that contains code to > handle network callbacks. However, beware! I think there are subtle > bugs in way this works with Vim's code path. You cannot just randomly > go calling functions from RealWaitForChar (for example, appending > text), and expect everything to be OK. You probably want to look in > network_io.c and os_unix.c. > > Cheers > Brad > Thanks for that link. Yes, I've looked into patched version of Vim. At this moment I don't want to force alpha-testers to patch Vim with network_io.patch -- while it's not stable and not found it's way into main Vim repository. About messing with Vim function calls from inside RealWaitForChar - I'm warned already. Currently I need only respond to keep-alive messages. /Gaspar -- Gaspar Chilingarov System Administrator, Network security consulting t +37493 419763 (mob) i 63174784 e [EMAIL PROTECTED]
Re: adding additional network stuff in RealWaitForChar?
On 11/09/06, Gaspar Chilingarov <[EMAIL PROTECTED]> wrote: Hello all vimmers! I would like to ask - how should I add additional stuff in RealWaitForChar? I have some network protocol, when another side periodically send me keepalive messages(every 10-15 secs). I would like to receive them and process. In GUI based vim it was pretty simple -- using gdk_input_add or similar thing. In other hand I would like to console users have same benefits - I've added handlers in RealWaitForChar, but ... it processes only first message on it's own. All latter messages are received, but does not processed -- until I press some key periodically, thus causing remote site timeouting and aborting the connection. I've implemented it in a quite similar way to FEAT_MOUSE_GPM and USE_XSMP implementations. What can I miss there? Any recommendations where to look? Thanks in advance, Gaspar There is a patched Vim7 here (http://theclapp.org/repos/vim70+async+ecl/) that contains code to handle network callbacks. However, beware! I think there are subtle bugs in way this works with Vim's code path. You cannot just randomly go calling functions from RealWaitForChar (for example, appending text), and expect everything to be OK. You probably want to look in network_io.c and os_unix.c. Cheers Brad
adding additional network stuff in RealWaitForChar?
Hello all vimmers! I would like to ask - how should I add additional stuff in RealWaitForChar? I have some network protocol, when another side periodically send me keepalive messages(every 10-15 secs). I would like to receive them and process. In GUI based vim it was pretty simple -- using gdk_input_add or similar thing. In other hand I would like to console users have same benefits - I've added handlers in RealWaitForChar, but ... it processes only first message on it's own. All latter messages are received, but does not processed -- until I press some key periodically, thus causing remote site timeouting and aborting the connection. I've implemented it in a quite similar way to FEAT_MOUSE_GPM and USE_XSMP implementations. What can I miss there? Any recommendations where to look? Thanks in advance, Gaspar -- Gaspar Chilingarov System Administrator, Network security consulting t +37493 419763 (mob) i 63174784 e [EMAIL PROTECTED]