Hello Jonathan, Happy to hear Mosh is helpful! Re: an API, you might take a look at how the mosh-client program is implemented (https://github.com/keithw/mosh/blob/master/src/frontend/mosh-client.cc). It instantiates an STMClient object, calls the init() method, and then the main() method, which encapsulates the whole eventloop.
Not sure if this is quite what you're looking for, but maybe if you tell us some more about your use case we might be able to be more helpful. As you probably know, Mosh is really only useful for conveying an interactive terminal over the network; it's not really set up to be a general communications layer for arbitrary streams. Best regards, Keith On Fri, May 2, 2014 at 6:54 PM, Jonathan Barronville <jonat...@belairlabs.com> wrote: > Hi, Keith. > > My name is Jonathan Barronville. I'm a hacker here in Boston. > I've been using Mosh for a while now and I really really enjoy it. > Thanks so much for building it! > > Anyway, I'm working on a project for virtual machine management and I want > to use Mosh for the communication layer, rather than simply using SSH. Now, > I have a fairly good understanding of how Mosh works and have even glanced > through some of the code, but I was somewhat disappointed to find that Mosh > doesn't have some type of main high-level C (or even C++) API I could use. > In other words, it would be great if I could just link to libmosh or > something like that, include a header, and just call a couple high-level > functions. Maybe I'm not looking in the right place ... how straightforward > is this with Mosh? All I need is a main entry point (like a header) to use > some high-level Mosh functions (something like `mosh_connect()` for > example). > > Please let me know what you think or at least, if possible, give me a few > pointers. > Thanks! > Have a good one! > > - Jonathan _______________________________________________ mosh-devel mailing list mosh-devel@mit.edu http://mailman.mit.edu/mailman/listinfo/mosh-devel