0

I am using PokeIn and when I run the following call:

function OnSucceeded(messagefixed) {
            if (PokeIn.IsConnected) {
               pCall['Dummy'].SendMessageToAllUsers(messagefixed);

               __doPostBack('LinkButton1', messagefixed);
           }
           else
               alert("This client is not connected!");
       }

It doesn't work... it just does a post back, however, if I comment out the __doPostBack it works perfectly fine and does the previous call.. am i doing something wrong?

The "SendMessageToAllUsers" is a function from the code-behind in VB.NET which is:

Public Sub SendMessageToAllUsers(ByVal stMessage As String)
    CometWorker.Groups.Send("SSID:" & iSDID, ("UpdateTime('" & stMessage & "');"))
End Sub
  • 1
    Is `SendMessageToAllUsers` *synchronous* (it waits for the message to be sent before returning) or *asynchronous* (it starts sending the message but may return before the message has been sent)? If the latter, __doPostBack may interrupt the sending of the message. – Michael Liu Jul 22 '16 at 02:43
  • I guess it is synchronous? I dont know how to check, but if that's the case.. is there a command to make it wait until its processed fully? or run in the background so we can do the post back? – The Daily User Jul 22 '16 at 14:58
  • I suspect `SendMessageToAllUsers` is asynchronous. You would have to consult the PokeIn documentation and see how you could determine when the message has been sent. – Michael Liu Jul 22 '16 at 18:25
  • I can't seem to find anything on their end, what are my options now? – The Daily User Jul 23 '16 at 15:58

0 Answers0