Package org.graphstream.stream.netstream

Examples of org.graphstream.stream.netstream.NetStreamSender


public class ExampleSender {

  public static void main(String[] args) {
    Graph g = new MultiGraph("G");
    // - the sender
    NetStreamSender nsc = null;
    try {
      nsc = new NetStreamSender(2001);
    } catch (UnknownHostException e) {
      e.printStackTrace();
    } catch (IOException e) {
      e.printStackTrace();
    }
   
    nsc.setPacker(new Base64Packer());
   
    // - plug the graph to the sender so that graph events can be
    // sent automatically
    g.addSink(nsc);
    // - generate some events on the client side
View Full Code Here


      public void run() {
        // - the original graph from which events are generated
        Graph g = new MultiGraph("G");
        // - the sender
        NetStreamSender nsc = null;
        try {
          nsc = new NetStreamSender(2001);
        } catch (UnknownHostException e) {
          e.printStackTrace();
        } catch (IOException e) {
          e.printStackTrace();
        }
       
        nsc.setPacker(new Base64Packer());

       
        // - plug the graph to the sender so that graph events can be
        // sent automatically
        g.addSink(nsc);
View Full Code Here

TOP

Related Classes of org.graphstream.stream.netstream.NetStreamSender

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.