Examples of EndpointDataListener


Examples of com.peterhi.net2.Endpoint.EndpointDataListener

public class ServerApp {

  public static void main(String[] args) throws Exception {
    Endpoint endpoint = new Endpoint(22222);
    endpoint.addEndpointDataListener(new EndpointDataListener() {
      @Override
      public void received(EndpointDataEvent event) {
        System.out.println("Received " + new String(event.getData()) + ", from " + event.getAddress());
      }
    });
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.