emit method
Implementation
Socket emit(String event, Object data, [AckCall? ack]) {
int count = ++_counter;
var message = new Map<String, Object>();
message['event'] = event;
message['data'] = data;
if (ack != null) {
message['cid'] = count;
_acks[count] = getAckObject(event, ack);
}
var json = jsonEncode(message);
sendOrAdd(json);
return this;
}