Confirmation on code upload

This commit is contained in:
simon 2017-11-04 15:35:56 -04:00
parent 8f117c5e27
commit 41b981f3ab
2 changed files with 6 additions and 1 deletions

View File

@ -10,7 +10,6 @@ import java.net.InetSocketAddress;
public class Main { public class Main {
public static void main(String[] args){ public static void main(String[] args){
//TODO: Confirmation on code upload
//TODO: Copper/Iron/Biomass: on hover only //TODO: Copper/Iron/Biomass: on hover only
//TODO: Docs //TODO: Docs
//TODO: //TODO:

View File

@ -30,6 +30,12 @@ public class CodeUploadHandler implements MessageHandler {
//Write assembled code to mem //Write assembled code to mem
user.getUser().getCpu().getMemory().write((char) ar.origin, ar.bytes, ar.bytes.length); user.getUser().getCpu().getMemory().write((char) ar.origin, ar.bytes, ar.bytes.length);
user.getUser().getCpu().setCodeSegmentOffset(ar.origin); user.getUser().getCpu().setCodeSegmentOffset(ar.origin);
JSONObject response = new JSONObject();
response.put("t", "codeResponse");
response.put("bytes", ar.bytes.length);
user.getWebSocket().send(response.toJSONString());
} }