/** * Creates a server socket waiting on the configured port for incoming association requests. * * @param serverEventListener * the listener that is notified of incoming writes and when the server stopped listening for new * connections. * @throws IOException * if an error occurs binding to the port. */ public void startListening(ServerEventListener serverEventListener) throws IOException { timer = new Timer(); if (serverSocketFactory == null) { serverSocketFactory = ServerSocketFactory.getDefault(); } acseSap = new ServerAcseSap(port, backlog, bindAddr, new AcseListener(this), serverSocketFactory); acseSap.serverTSap.setMaxConnections(maxAssociations); this.serverEventListener = serverEventListener; listening = true; acseSap.startListening(); }
/** * Creates a server socket waiting on the configured port for incoming association requests. * * @param serverEventListener * the listener that is notified of incoming writes and when the server stopped listening for new * connections. * @throws IOException * if an error occurs binding to the port. */ public void startListening(ServerEventListener serverEventListener) throws IOException { timer = new Timer(); if (serverSocketFactory == null) { serverSocketFactory = ServerSocketFactory.getDefault(); } acseSap = new ServerAcseSap(port, backlog, bindAddr, new AcseListener(this), serverSocketFactory); acseSap.serverTSap.setMaxConnections(maxAssociations); this.serverEventListener = serverEventListener; listening = true; acseSap.startListening(); }