MCPcopy Create free account
hub / github.com/0linlin0/CyberBox / start

Method start

Skay_Exp/src/tools/nc/NetcatClient.java:27–37  ·  view source on GitHub ↗

Creates client socket makes request to the server. @throws Exception

(String host, int port)

Source from the content-addressed store, hash-verified

25 * @throws Exception
26 */
27 private static void start(String host, int port) throws Exception {
28 if (clientSocket == null) {
29 clientSocket = new Socket(host, port);
30 }
31 if (System.in.available() > 0) {
32 upload();
33 } else {
34 download();
35 }
36 clientSocket.close();
37 }
38
39 /**
40 * In download mode, client reads data from the socket and writes it to standard output.

Callers 1

mainMethod · 0.95

Calls 2

uploadMethod · 0.95
downloadMethod · 0.95

Tested by

no test coverage detected