Code example for InetSocketAddress

0
 
        // Set up the event pipeline factory. 
        bootstrap.setPipelineFactory(new AutobahnServerPipelineFactory()); 
 
        // Bind and start to accept incoming connections. 
        bootstrap.bind(new InetSocketAddress(port)); 
 
        System.out.println("Web Socket Server started at port " + port); 
    } 
 
    public static void main(String[] args) { 
        int port; 
        if (args.length > 0) { 
            port = Integer.parseInt(args[0]); 
        } else { 
            port = 9000; 
        } 
        new AutobahnServer(port).run(); 
    } 
}