We want to split the message into several (SMS) text messages, if the letter is more than 136.
But we also want to make sure that the second message comes after the first and the third.
So far, whatever tests we have done, it seems that this is such a thing, but to ensure that we still want to add a delay of 3 seconds or more.
is This code is: threads. Sleep is the right way to do this, or is there any other solution by adding a delay?
// Split the message to send them as separate text messages string [] Message = Split Message (Request ["Message "], 132); For (Int i = 0; I & lt; Message; Long; i ++) {HTTP WebBurvest _wr = (HTTP WebBurm) WebRequest.CRETE (URL); // Use credential catch so that you can attach authentication for the request CredentialCache mycache = new credential cache {{new Yuri (URL), "Basic", new network credentials (_username, _password)}}; // Basic authentication _wr.Credentials = mycache; _wr.method = "POST"; _wr.ContentType = "App / Jason"; _wr.Timeout = -1; // If this is not necessary, it is not necessary, but it is not harmful / / / data variable requests that the server be pushed to the server on request. // In this piece of data, the application string requests to send a text message from _data = "{\" outboundSMSMessageRequest \ ":" + "{\" address \ ": \" "+ + + + +" + + + + + + + + + + + + + + " "\": "\": \ ": \": "\": \ ": \": \ ": \": \ "Request file ] + "\" + Request ["sender"] + "\" "+ _optional +"}} "; // Get a reference to the request-stream, and use it by writing post data (_data) (var s = new streamer (_wr.GetRequestStream ())) {s.Write (_data); } // Get feedback - Receive the stream, and use a stream reader to read the content {HTTP webbans_proc. = (HTTP webbense) _wr.GetResponse (); } Using (using pre-WebException) {StreamerLiter file = new streamer (@ "D: \ web
I am checking the documents of your SMS sender API Because it can be written there that SMS messages do not guarantee the order - they can be the internal row and the response to the server can mean that they have sent the message, not the person they have given it, in this case 3, 5 or 10 seconds Adding the delay will not help.
Comments
Post a Comment