tweaks
This commit is contained in:
parent
f464eba995
commit
b0cf8d2c40
@ -17,7 +17,7 @@ socket.on("currentAmount") {data, ack in
|
||||
socket.emit("update", ["amount": cur + 2.50])
|
||||
}
|
||||
|
||||
ack?("Got your currentAmount", "dude")
|
||||
ack <- ["Got your currentAmount", "dude"]
|
||||
}
|
||||
}
|
||||
|
||||
@ -39,7 +39,7 @@ SocketIOClient* socket = [[SocketIOClient alloc] initWithSocketURL:@"localhost:8
|
||||
[socket emit:@"update" withItems:@[@{@"amount": @(cur + 2.50)}]];
|
||||
});
|
||||
|
||||
ack(@[@"Got your currentAmount, ", @"dude"]);
|
||||
[ack with:@[@"Got your ack, ", @"dude"]];
|
||||
}];
|
||||
|
||||
[socket connect];
|
||||
|
||||
@ -34,11 +34,11 @@ public class SocketAckEmitter: NSObject {
|
||||
self.ackNum = ackNum
|
||||
}
|
||||
|
||||
public func ackWith(items: [AnyObject]) {
|
||||
public func with(items: [AnyObject]) {
|
||||
socket.emitAck(ackNum, withItems: items)
|
||||
}
|
||||
}
|
||||
|
||||
public func <-(lhs: SocketAckEmitter?, rhs: [AnyObject]) {
|
||||
lhs?.ackWith(rhs)
|
||||
lhs?.with(rhs)
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user