WIP: Handler abstraction
This commit is contained in:
parent
ed1f995b3c
commit
49e4317867
|
@ -195,6 +195,9 @@ public final class BesterConnection : Thread
|
|||
/* In the case of an error with the message handler, send an error to the client/server */
|
||||
|
||||
/* TODO: Send error here */
|
||||
//JSONValue errorResponse;
|
||||
//errorResponse["dd"] = 2;
|
||||
//debugPrint("Response error");
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
|
|
|
@ -146,7 +146,11 @@ public final class HandlerResponse
|
|||
/* TODO: Implement me */
|
||||
|
||||
/* TODO: Construct a payload for the receiving clients */
|
||||
JSONValue clientPayload = parseJSON("\"HELLO\"");
|
||||
JSONValue clientPayload;
|
||||
|
||||
JSONValue headerBlock;
|
||||
//headerBlock["handlerName"] =
|
||||
clientPayload["header"] = 2;
|
||||
|
||||
/**
|
||||
* Loop through each BesterConnection in connectionList and
|
||||
|
|
|
@ -20,10 +20,10 @@ def basicTest():
|
|||
print(receivedData)
|
||||
|
||||
# Now we can do it again (without authentication)
|
||||
bys=json.dumps({"header":{},"payload":{"data":"POES","type":"type1"}})
|
||||
print(len(bys), bys)
|
||||
d.send(len(bys).to_bytes(4, "little"))
|
||||
d.send(bys.encode())
|
||||
#bys=json.dumps({"header":{},"payload":{"data":"POES","type":"type1"}})
|
||||
#print(len(bys), bys)
|
||||
#d.send(len(bys).to_bytes(4, "little"))
|
||||
#d.send(bys.encode())
|
||||
|
||||
while True: pass
|
||||
d.close()
|
||||
|
|
Loading…
Reference in New Issue