aboutsummaryrefslogtreecommitdiff
path: root/src/client/SocketStub.ts
diff options
context:
space:
mode:
authoryipstanley <stanley_yip@brown.edu>2019-02-13 20:17:21 -0500
committeryipstanley <stanley_yip@brown.edu>2019-02-13 20:17:21 -0500
commitf3544f004a696e4682fbd8d1f18ac69beec59439 (patch)
tree0839c355fe813ba494c6451b9017c5e325e1cfb8 /src/client/SocketStub.ts
parent430878f6dd8d36b1322e15d0898ada0d44fecacb (diff)
asdfkj
Diffstat (limited to 'src/client/SocketStub.ts')
-rw-r--r--src/client/SocketStub.ts7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/client/SocketStub.ts b/src/client/SocketStub.ts
index 03c0131ba..136c69668 100644
--- a/src/client/SocketStub.ts
+++ b/src/client/SocketStub.ts
@@ -34,8 +34,7 @@ export class SocketStub {
public static SEND_FIELD_REQUEST(fieldid: FIELD_ID, callback: (field: Field) => void) {
if (fieldid) {
- let args: GetFieldArgs = new GetFieldArgs(fieldid)
- Utils.EmitCallback(Server.Socket, MessageStore.GetField, args, (field: Field) => callback(field))
+ Utils.EmitCallback(Server.Socket, MessageStore.GetField, fieldid, (field: Field) => callback(field))
}
}
@@ -67,12 +66,12 @@ export class SocketStub {
document._proxies.delete(key.Id);
}
- public static SEND_SET_FIELD(field: Field) {
+ public static SEND_SET_FIELD(field: Field, fn: (args: any) => void) {
// Send a request to set the value of a field
// ...SOCKET(SET_FIELD, field id, serialized field value)
// Server updates the value of the field in its fieldstore
- Utils.Emit(Server.Socket, MessageStore.SetField, field.ToJson())
+ Utils.EmitCallback(Server.Socket, MessageStore.SetField, field.ToJson(), fn)
}
}