Package kilim.examples
Class Ping
java.lang.Object
kilim.examples.Ping
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 ClassesModifier and TypeClassDescriptionstatic classThe Client is a conventional Java socket application.static classServer is a SessionTask, which means an instance of it is created by the NioSelectorScheduler on an incoming connection. -
Field Summary
FieldsModifier and TypeFieldDescription(package private) static int(package private) static int(package private) static boolean -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
PACKET_LEN
static int PACKET_LEN -
server
static boolean server -
port
static int port
-
-
Constructor Details
-
Ping
public Ping()
-
-
Method Details
-
main
- Throws:
Exception
-
usage
private static void usage() -
parsePort
-