Exemplo n.º 1
0
        //example for xrpcd.Function: "http://www.tangenta.si/AddUser.php"
        private void SendUser(RPCd xrpcd)
        {
            RPCClient wc = new RPCClient(xrpcd);

            var URI = new Uri(xrpcd.Function);

            //If any encoding is needed.
            //wc.Headers["Content-Type"] = "UserData";
            //Or any other encoding type.
            wc.Encoding = System.Text.Encoding.UTF8;

            //If any key needed
            //wc.Headers["KEY"] = "name=Data_To_Be_sent1";

            var bytes = Encoding.UTF8.GetBytes(xrpcd.data);

            string CodedBase64data = Convert.ToBase64String(bytes);

            wc.UploadStringCompleted +=
                new UploadStringCompletedEventHandler(mywc_UploadStringCompleted);

            wc.UploadStringAsync(URI, "POST", CodedBase64data);
        }
Exemplo n.º 2
0
 public RPCClient(RPCd xrpcd)
 {
     m_rpcd = xrpcd;
 }
Exemplo n.º 3
0
 public void Execute(RPCd rpcd)
 {
     ThreadP_Message msg = new ThreadP_Message(msg_ID, ThreadP_Message.eMessage.TASK, SendUser_WaitResponse, rpcd);
     threadp.message_box.Post(msg);
 }