sim is a simple network application framework.
- framework
- tcp server
- tcp client
- new byte buffer
- avoid java nio bug
- performance testing
- codec
- line codec
- Redis RESP2 codec
- http1.1 codec
- experimental project
Server server = Server.tcp(10010);
server.handler(new ServerHandler());
server.start();
Server server = Server.tcp(10010);
server.handler(new ServerHandler());
server.start();
Client client = new Client(new RedisClientHandler());
client.tail("0.0.0.0", 6379);
client.async();
Scanner input = new Scanner(System.in);
while (true) {
String command = input.nextLine();
if (command == null || command.trim().length() == 0) {
continue;
}
client.send(Command.fromString(command));
}