标签:#websocket

Posts

· 2017-11-06 · * web * websocket *
Simulate console in web/html page with websocket server.

Idea from AndroidConsoleServer (I call it ACS), but ACS uses jquery for looply fetch server data, not convenient for server commands developing. With websocket, server could send information to web page by itself.

Three important parts consist this console server, Commands Parser & Websockets & Html

Commands parser

Using java annotation for mark the command methods:


@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface Command {