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

Method upload

Skay_Exp/src/tools/nc/NetcatUDPServer.java:67–72  ·  view source on GitHub ↗

In upload mode, server reads data from its standard input device and writes it to the socket. @throws Exception

()

Source from the content-addressed store, hash-verified

65 * @throws Exception
66 */
67 private static void upload() throws Exception {
68 byte[] receiveData = new byte[4096];
69 DatagramPacket receivePacket = new DatagramPacket(receiveData, receiveData.length);
70 serverSocket.receive(receivePacket);
71 System.out.println(new String(receivePacket.getData()).trim());
72 }
73
74 /**
75 * Starts execution of the program, requiring a port number as an argument.

Callers 1

startMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected