Xojo Cloud UDPSocket Write/Read In Progress to be solved. Slow Me down !

  1. 2 weeks ago
    Edited 2 weeks ago

    Hi Dear friends

    New in Xojo, but not newbie at programming level, I encounter this nasty problem:

    Dim f As New XojoCloud.FirewallPort(kPort, XojoCloud.FirewallPort.Direction.Outgoing)
    f.Open

    Dim udpSend As New UDPSocket

    udpSend.Port = kPort // (49243)

    if f.isOpen Then
    udpSend.Connect
    if udpSend.IsConnected Then

    Label7.Text = "Udp: " + Str(udpSend.IsConnected) // True !!!
    udpSend.Write(addTextField.Text, msgTextField.Text) // Got Udp Connected False and Error Code 107 and the Port It's still Open!!

    // Label6.Text = "UDP Example - Port: " + Str(udpSend.Port) + " Last Error Code : " + Str(udpSend.LastErrorCode)
    //Label6.Text = Label6.Text + " Udp: " + Str(udpSend.IsConnected) + " Port: " + Str(f.IsOpen)
    End If
    udpSend.Close
    f.Close
    End If

    What I'm doing wrong ? At local level, everything working well and smouth, but same Code on Xojo Cloud NOT !
    At Xojo Cloud the UDPSocket don't working ? What happening ?

    If you have some suggestions to solve this issue, pls. inform'me.

    All my data loggers using Cat M1 can send/receive data from/to Socket Test/Udp Test Tool !

    Have somebody tested this kind of communication ????

    Thanks
    Zoltan

  2. i Should to check QT ? Your solution struggle/not working with UDP Packages. I should to apply to "Total Refound Police ?"
    Be carefull next buyers about this unsolved issue from this guys.

  3. Beatrix W

    Oct 7 Pre-Release Testers, Third Party Store Europe (Germany)

    Sigh...

    Don't be so dramatic. Wait until the rest of the world is awake.

  4. Maurizio R

    Oct 7 Pre-Release Testers, Xojo Pro
    Edited 2 weeks ago

    Hi Zoltan,
    please check the Port property after calling the Connect method and proceed as required.
    Report here your results and possibly we can help you.

    Be aware that most Xojo's objects are event driven and it's better if you refactor your code in an event driven way.

    P.S.
    Also QT is event driven so switching to it change nothing.

  5. Edited 2 weeks ago

    Hi Maurizio Rossi

    It's one nice good sounding name. Thank you for your very fast feedback !
    Please check my first mail. Everything its ok with first udpsocket opening. The issue are came invocing the udp write command . Got udp closed and 107 error code !
    I spended to much time to discover this Xojo error, I'm ready to give it up ....

    Zoltan

  6. Edited 2 weeks ago

    to Beatrix Willius

    Who are You to give to me advice ?

    Do You have some UDP At Cloud Level advises Yes or Not !

  7. Greg O

    Oct 7 Xojo Inc
    Edited 2 weeks ago

    Maurizio is correct. UDPSocket is not a synchronous protocol and you are trying to treat it as such. Looking at this code:

     Label7.Text = "Udp: " + Str(udpSend.IsConnected) // True !!!
    udpSend.Write(addTextField.Text, msgTextField.Text) // Got Udp Connected False and Error Code 107 and the Port It's still Open!!

    Based on your comments, I think there are two possibilities (although I really think it’s #1)

    1. You probably need to also open an incoming firewall port
    2. The port may be in use by another system resource. Remember, just because it’s your own server, doesn’t mean that there aren’t other services using system resources.
  8. Greg O

    Oct 7 Xojo Inc
    Edited 2 weeks ago

    @Zoltan M to Beatrix Willius

    Who are You to give to me advice ?

    Do You have some UDP At Cloud Level advises Yes or Not !

    This is a user forum and you will always get answers from other users, some who are using Xojo Cloud and some who are not... and maybe from Xojo, if we happen to notice your thread. Please be civil.

  9. Hi Greg

    Yes, I have one One opened Firewall Port as you can see at my original post the port was open and udpsocket also was alive. After using UDPSocket Write command, I got 107 error code message and the udp connection was going to False !

    Please, If You have time and kind, try my original code and maybe can you find find something what I made wrong ! I can pay for this services !

    Zoltan

  10. Rick A

    Oct 7 Pre-Release Testers (Brazil. GMT-3:00)

    @Greg OLone Beatrix is correct. UDPSocket is not a synchronous protocol

    You mean, Maurizio.

    @Markus W I think I’ll get some popcorn …

    I'll make some coffee. :D

  11. Markus W

    Oct 7 Pre-Release Testers #JeSuisHuman New Zealand, Auc...

    @Rick A I'll make some coffee. :D

    I think Greg pinched my popcorn :(

  12. Rick A

    Oct 7 Pre-Release Testers (Brazil. GMT-3:00)

    @Markus W I think Greg pinched my popcorn :(

    -image-

  13. Greg O

    Oct 7 Xojo Inc

    @Zoltan M Hi Greg

    Yes, I have one One opened Firewall Port as you can see at my original post the port was open and udpsocket also was alive. After using UDPSocket Write command, I got 107 error code message and the udp connection was going to False !

    Please, If You have time and kind, try my original code and maybe can you find find something what I made wrong ! I can pay for this services !

    Zoltan

    You didn’t read my response. Your code indicates that you only created an Outgoing port. UDP being a broadcast protocol may also require an incoming port to function properly. Please try that.

  14. Edited 2 weeks ago

    Hi Greg

    Thanks. Getting Old ! Need to create Incoming/Outgoing FirewallPort separately for same Port ?
    It's late night at Auckland. I will try tomorrow morning and i will get back to you Sir !
    Thanks !

  15. Markus R

    Oct 7 Pre-Release Testers, Xojo Pro Europe / Germany
    Edited 2 weeks ago

    see also this guide
    UserGuide:UDP_Communication

    (i think the SocketCore methods in udp class is a little bit misleading.)

  16. Newer ›

or Sign Up to reply!