Package com.peterhi.net3.Local

Examples of com.peterhi.net3.Local.Listener


public class Server {

  public static void main(String[] args) throws Exception {
    Local local = new Local(22222);
    local.getSocket().setSoTimeout(10);
    local.addListener(new Listener() {
      @Override
      public void received(SocketAddress address, byte[] data) {
        System.out.println("Received " + new String(data) + " from " + address);
      }
    });
View Full Code Here

TOP

Related Classes of com.peterhi.net3.Local.Listener

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.