From fdb4cc200dca5db5b374fc40ab3723eb8bf96886 Mon Sep 17 00:00:00 2001 From: jestin Date: Tue, 1 Aug 2006 21:42:25 +0000 Subject: small steps towards the Ivy tunnel . This is work in progress... --- src/Ghost.java | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src/Ghost.java') diff --git a/src/Ghost.java b/src/Ghost.java index ad6e78c..fd7465d 100644 --- a/src/Ghost.java +++ b/src/Ghost.java @@ -22,18 +22,21 @@ class Ghost extends IvyClient { super(bus,socket,remotePort,incoming); this.id=id; this.pc=pc; + System.out.println("new Ghost: "+id+" pc:"+pc); } + // ProxyClient -> Ghost -> Ivy Bus protected synchronized void sendBuffer( String buffer ) throws IvyException { - System.out.println("out buffer: "+buffer); - pc.forward(id,buffer); - super.sendBuffer(buffer); + // System.out.println("out buffer: "+buffer+" for:"+pc+" id:"+id); + super.sendBuffer(buffer); // and to all the agents on the Ghost bus ? I'm not sure } + // Bus -> Ghost -> ProxyClient -> ProxyMaster -> other buses protected boolean newParseMsg(String s) throws IvyException { - System.out.println("in buffer: "+s); - pc.forward(id,buffer); - return super.newParseMsg(s); + // I received a message from an agent on the bus + System.out.println("in buffer to forward from "+id+": "+s); + if (pc!=null) pc.forward(id,s); // forward to all the puppets + return super.newParseMsg(s); // I'll take no action } } -- cgit v1.1