msgpack: Allow notifications to execute commands.

Consider: `let vim = rpcstart('nvim', ['--embed'])`

Allows `rpcnotify(vim, ...)` to work like an asynchronous
`rpcrequest(nvim, ...)`.

Helped-by: Michael Reed <m.reed@mykolab.com>
Helped-by: Justin M. Keyes <>
This commit is contained in:
Scott Prager
2014-11-10 13:58:37 -05:00
parent 8d59e74f6c
commit 676133aa9b
4 changed files with 116 additions and 32 deletions

View File

@@ -22,6 +22,15 @@ typedef enum {
kErrorTypeValidation
} ErrorType;
typedef enum {
kMessageTypeRequest,
kMessageTypeResponse,
kMessageTypeNotification
} MessageType;
/// Used as the message ID of notifications.
#define NO_RESPONSE UINT64_MAX
typedef struct {
ErrorType type;
char msg[1024];