public void SendUpdateMessage(string compType, Guid customId, GhLivePoint position, UpdateType type) { GhLiveMessage messageObj = new GhLiveMessage(); messageObj.Type = compType; messageObj.CustomId = customId; messageObj.Point = position; messageObj.UpdateType = type; messageObj.Sender = _id; string stuff = Newtonsoft.Json.JsonConvert.SerializeObject(messageObj); socket.Emit("update", stuff); }
public void SendAddUpdateMessage(string compType, Guid customId, GhLivePoint position) { SendUpdateMessage(compType, customId, position, UpdateType.Add); }
public void SendMoveUpdateMessage(Guid customId, GhLivePoint position) { SendUpdateMessage(string.Empty, customId, position, UpdateType.Move); }