MCPcopy Create free account
hub / github.com/codenameone/CodenameOne / close

Method close

CodenameOne/src/com/codename1/io/Socket.java:133–147  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

131 }, "Connection to " + host).start();
132 return new Close() {
133 @Override
134 public void close() throws IOException {
135 while (connection[0] == null) {
136 try {
137 Thread.sleep(200);
138 } catch (InterruptedException e) {
139 Log.e(e);
140 throw new RuntimeException(e.getMessage(), e);
141 }
142 }
143 if (Util.getImplementation().isSocketConnected(connection[0])) {
144 Util.getImplementation().disconnectSocket(connection[0]);
145 }
146 connection[0] = null;
147 }
148 };
149 }
150

Callers 3

closeSocketQuietlyMethod · 0.95
closeSocketQuietlyMethod · 0.95
runMethod · 0.95

Calls 6

sleepMethod · 0.95
eMethod · 0.95
getImplementationMethod · 0.95
getMessageMethod · 0.65
isSocketConnectedMethod · 0.45
disconnectSocketMethod · 0.45

Tested by

no test coverage detected