public Task <string> GET_BRAINTREE_TOKEN()
 {
     return(Task.Factory.StartNew(() =>
     {
         string message = "GET_BRAINTREE_CLIENT_TOKEN:" + FireAuth.getFirebaseToken() + "!";
         return sendMessageForResponse(message).Result;
     }));
 }
 public static Task GET_DROVER(double lat, double lng)
 {
     return(Task.Factory.StartNew(() =>
     {
         Socket s = new Socket(SocketType.Stream, ProtocolType.Tcp);
         s.Connect(remoteEP);
         string message = "GET_DROVER:" + lat + "," + lng + "," + FireAuth.getFirebaseToken() + "!";
         s.Send(getBytes(message));
         s.Shutdown(SocketShutdown.Both);
         s.Close();
     }));
 }
 public static Task REQUEST_DRIVER_MODE()
 {
     return(Task.Factory.StartNew(() =>
     {
         Socket s = new Socket(SocketType.Stream, ProtocolType.Tcp);
         s.Connect(remoteEP);
         string message = "REQUEST_DRIVER_MODE:" + FireAuth.getFirebaseToken() + "!";
         s.Send(getBytes(message));
         s.Shutdown(SocketShutdown.Both);
         s.Close();
     }));
 }
 public static Task CONFIRM_DROP_OFF(string rideID)
 {
     return(Task.Factory.StartNew(() =>
     {
         Socket s = new Socket(SocketType.Stream, ProtocolType.Tcp);
         s.Connect(remoteEP);
         string message = "CONFIRM_DROP_OFF:" + rideID + "," + FireAuth.getFirebaseToken() + "!";
         s.Send(getBytes(message));
         s.Shutdown(SocketShutdown.Both);
         s.Close();
     }));
 }
 public static Task PROPOSAL_RESPONSE(bool respo)
 {
     return(Task.Factory.StartNew(() =>
     {
         int resp = respo ? 1 : 0;
         Socket s = new Socket(SocketType.Stream, ProtocolType.Tcp);
         s.Connect(remoteEP);
         string message = "PROPOSAL_RESPONSE:" + resp + "," + FireAuth.getFirebaseToken() + "!";
         s.Send(getBytes(message));
         s.Shutdown(SocketShutdown.Both);
         s.Close();
     }));
 }