Class Ping

java.lang.Object
kilim.examples.Ping

public class Ping extends Object
Example showing kilim's support for NIO. Usage: java kilim.examples.Ping -server in one window and java kilim.examples.Ping -client in one or more windows. The client sends a number of 100 byte packets which are then echoed by the server.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    The Client is a conventional Java socket application.
    static class 
    Server is a SessionTask, which means an instance of it is created by the NioSelectorScheduler on an incoming connection.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) static int
     
    (package private) static int
     
    (package private) static boolean
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    main(String[] args)
     
    (package private) static void
    parsePort(String portstr)
     
    private static void
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • PACKET_LEN

      static int PACKET_LEN
    • server

      static boolean server
    • port

      static int port
  • Constructor Details

    • Ping

      public Ping()
  • Method Details

    • main

      public static void main(String[] args) throws Exception
      Throws:
      Exception
    • usage

      private static void usage()
    • parsePort

      static void parsePort(String portstr)