()
| 76 | } |
| 77 | Display.getInstance().startThread(new Runnable() { |
| 78 | @Override |
| 79 | public void run() { |
| 80 | Object connection = Util.getImplementation().connectSocket(host, port, sc.getConnectTimeout()); |
| 81 | if (connection != null) { |
| 82 | sc.setConnected(true); |
| 83 | sc.input = new SocketInputStream(connection, sc); |
| 84 | sc.output = new SocketOutputStream(connection, sc); |
| 85 | sc.connectionEstablished(sc.input, sc.output); |
| 86 | } else { |
| 87 | sc.setConnected(false); |
| 88 | if (connection == null) { |
| 89 | sc.connectionError(-1, "Failed to connect"); |
| 90 | } else { |
| 91 | sc.connectionError(Util.getImplementation().getSocketErrorCode(connection), Util.getImplementation().getSocketErrorMessage(connection)); |
| 92 | } |
| 93 | } |
| 94 | } |
| 95 | }, "Connection to " + host).start(); |
| 96 | } |
| 97 |
nothing calls this directly
no test coverage detected