Created
January 20, 2011 11:24
-
-
Save jlg/787762 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.net.ServerSocket; | |
| import py4j.GatewayServer; | |
| public class AddrInUseTest { | |
| public AddrInUseTest() {}; | |
| public static void main(String[] args) throws Exception { | |
| int port = 25333; | |
| // bind to port | |
| ServerSocket sSocket = new ServerSocket(port); | |
| // this should thorw BindException | |
| GatewayServer.turnLoggingOn(); | |
| GatewayServer gatewayServer = new GatewayServer(new AddrInUseTest(), port, 1000, 1000); | |
| gatewayServer.start(); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment