MCPcopy Index your code
hub / github.com/processing/processing / run

Method run

app/src/processing/app/WebServer.java:135–156  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

133 //SwingUtilities.invokeLater(new Runnable() {
134 Runnable r = new Runnable() {
135 public void run() {
136 try {
137 ServerSocket ss = new ServerSocket(port);
138 while (true) {
139 Socket s = ss.accept();
140 WebServerWorker w = null;
141 synchronized (threads) {
142 if (threads.isEmpty()) {
143 WebServerWorker ws = new WebServerWorker(zip, entries);
144 ws.setSocket(s);
145 (new Thread(ws, "additional worker")).start();
146 } else {
147 w = (WebServerWorker) threads.elementAt(0);
148 threads.removeElementAt(0);
149 w.setSocket(s);
150 }
151 }
152 }
153 } catch (IOException e) {
154 e.printStackTrace();
155 }
156 }
157 };
158 new Thread(r).start();
159// });

Callers

nothing calls this directly

Calls 4

setSocketMethod · 0.95
acceptMethod · 0.65
startMethod · 0.45
printStackTraceMethod · 0.45

Tested by

no test coverage detected