Package com.peterhi.obsolete

Examples of com.peterhi.obsolete.RudpDataListener


public class MultithreadedServer {

  public static void main(String[] args) throws Exception {
    RudpLocalEndpoint localEndpoint = new MultithreadedRudpLocalEndpoint(22222);
    localEndpoint.addListener(new RudpDataListener() {
      @Override
      public void received(RudpDataEvent event) {
        try {
          System.out.println("Received " + (event.isReliable() ? "reliable" : "unreliable") +
            " data of " + event.getInputStream().available() + " bytes");
View Full Code Here


public class RudpEventLoopServer {

  public static void main(String[] args) throws Exception {
    RudpLocalEndpoint localEndpoint = new EventLoopRudpLocalEndpoint(22222);
    localEndpoint.addListener(new RudpDataListener() {
      @Override
      public void received(RudpDataEvent event) {
        try {
          System.out.println("Received " + (event.isReliable() ? "reliable" : "unreliable") +
            " data of " + event.getInputStream().available() + " bytes");
View Full Code Here

TOP

Related Classes of com.peterhi.obsolete.RudpDataListener

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.