OSCPort { public static int defaultSCOSCPort() { return DEFAULT_SC_OSC_PORT; } protected  OSCPort(final SocketAddress local, final SocketAddress remote); static int defaultSCOSCPort(); static int defaultSCLangOSCPort(); static InetAddress generateWildcard(final SocketAddress address); static int extractFamily(final SocketAddress address); void connect(); void disconnect(); boolean isConnected(); SocketAddress getLocalAddress(); SocketAddress getRemoteAddress(); void close(); static final int DEFAULT_SC_OSC_PORT; static final int DEFAULT_SC_LANG_OSC_PORT; }
@Test public void testSocketAutoClose() throws Exception { receiver = null; sender = null; System.gc(); Thread.sleep(WAIT_FOR_SOCKET_CLOSE); sender = new OSCPortOut(); receiver = new OSCPortIn(OSCPort.defaultSCOSCPort()); }