I was bashing my head against a wall most of yesterday until I figured out that JSON strings must be newline terminated for JsonNioService to accept them.  Now it works - I can send JSON commands from my program to Jmol with sync on an arbitrary host and port using a little C socket lib I wrote.  Now I'm working on a C++ wrapper class for the functionality I need.  I'll post code soon, on Github or similar.


Regards,
Benn


On Wed, Jun 6, 2012 at 7:25 AM, Robert Hanson <hansonr@stolaf.edu> wrote:
Take a look at the MPJmolApp.java

Basically you open a socket on port 3000 and start sending requests. I think you would set up Jmol with sync -3000 so that it is the server, not the client.

On Tue, Jun 5, 2012 at 4:46 PM, Benn Snyder <benn.snyder@gmail.com> wrote:
Bob,

Alright, I have checked out trunk.  I can get two instances of Jmol to
communicate by doing
Jmol1: $ sync -3000
Jmol2: $ sync 3000 'command'

But I am stumped as to how to do this from C++.  As for the Kinect, I am
using OpenNI/NITE.  I've seen what MolecularPlayground has done and we'd
like to do something similar but hopefully more complex and in-depth.


Regards,
Benn

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers



--
Robert M. Hanson
Larson-Anderson Professor of Chemistry
Chair, Chemistry Department
St. Olaf College
Northfield, MN
http://www.stolaf.edu/people/hansonr


If nature does not answer first what we want,
it is better to take what answer we get.

-- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900



------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers