Skip to content
This repository has been archived by the owner on Nov 22, 2019. It is now read-only.

client side protocol #5

Open
sidorares opened this issue Jul 11, 2014 · 3 comments
Open

client side protocol #5

sidorares opened this issue Jul 11, 2014 · 3 comments

Comments

@sidorares
Copy link

I'd like to use this module as a client to vim agent (pretend I'm the vim). Currently VimClient is structured the way it's only can be used as server side end of client. I kind of still can use it, but I'd like to add proper client side protocol support. Would you be interested in PR adding this?

The code I tried to connect to vimnetbeans server:

var nb = require("./");
var net = require('net');

var socket = net.connect(3219);
var server = {
  _cleanupClient: function() {
    console.log('_cleanupClient', arguments);
  }
};
var client = new nb.VimClient(server, socket);
client.debug = true;
client.authed = true;

setTimeout(function() {
  console.log('Sending AUTH');
  socket.write('AUTH password\n');
}, 1000);

My use case: have Atom editor to connect to clewn / pyclewn

@clehner
Copy link
Owner

clehner commented Jul 12, 2014

This sounds useful. The existing VimClient is oriented around sending commands and functions, and receiving events and replies, whereas a real client would do the opposite. Would it be better to build the client capability into a new class? Or perhaps a new project? What could it share with the existing VimClient and VimBuffer?

@sidorares
Copy link
Author

I'm not sure yet :) maybe completeky separate client library would be easier

@sidorares
Copy link
Author

Though it woulld be useful to keep them together for tests

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants