User Tag List

Results 1 to 3 of 3

Thread: Sending binary problems with Lacewing over the internet

  1. #1
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleInstall Creator Pro

    Join Date
    Dec 2010
    Location
    United Kingdom
    Posts
    960
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Exclamation Sending binary problems with Lacewing over the internet

    Hi everyone. I'm facing an unfamiliar situation here.

    I'm trying to build a self-updating program using Lacewing as the underlying network protocol, but have hit a problem when 2 testers tried to use it (whom are connected via the internet)

    The binary could be considered large (about 2-3 MB) and initially I was sending it "all in one go". This works fine locally and over LAN, but "times out" over the internet. (I'm not actually sure how to detect a time out/unreachable, so I have a 10 second counter before telling the user it gave up) - The server also sends a hash and the number of bytes expected as a form of verification. The testers have had hash verification errors or it simply "timed out" each time.

    I have since updated this to send the binary into separate chunks using this thread as a guide and appending to a file when it arrives on the client. This slowed it down the process by a few more seconds over LAN and locally, but I assumed this would correct the problem. I have also added a "x KB out of y KB" and progress bar so the user can see the progress. Each chunk is 16384 bytes (~ 16 KB) in size.

    However, when this was tested again, it started reporting "26 KB of 0 KB" oddly to one tester before it "timed out" again. The server front end (for me) looked like it was being sent normally (although it looped a few times, which doesn't happen locally, before the server program crashed altogether).

    I'm not sure what's going on here. I presume the packets may be corrupted, or are being re-sent. Has anyone had experience with sending larger (> 2 MB) binary with Lacewing? Things seem to be perfectly fine locally or over LAN, but not when used over the internet.

    I'm pretty sure the internet connection can't be at fault here, it's ~ 2.3 MB/s (17.70 Mbps) upload.

    I'll probably try simulating a slow connection, lag and throttling to see if I can reproduce anything tomorrow. I have discovered that both the server/client will freeze (possibly crash) if transfers are too large.

    Thanks in advance!

  2. #2
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Keep in mind that your 'per-chunk' size is actually 'per-frame' - multiply that by your framerate and it might be larger than your upload speed.

    I would help but you've not given very much information that is useful to diagnosing problems.

    But, the main issue I see is, if all you want is auto-updating, why are you even trying to do this with Lacewing at all? Why not use a normal web server and the Download object? The HTTP protocol is reliable and will almost always work for all users without special port requirements. You're trying to reinvent the wheel.
    Working as fast as I can on Fusion 3

  3. #3
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleInstall Creator Pro

    Join Date
    Dec 2010
    Location
    United Kingdom
    Posts
    960
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I just realised this early hours this morning that I should have used HTTP and the GET/Download Object all along You are right, Lacewing is not best for this.

    I opted for Lacewing since it could have potentially been that "complete package" since it's also used for other purposes besides providing update packages. Which when I think about it, will probably hog up the server if more than one user tried accessing it.

    Thank you for the reply, time to put the right wheel in place.

Similar Threads

  1. Lacewing sending and receiving data
    By Agadroid in forum Fusion 2.5
    Replies: 2
    Last Post: 21st January 2015, 11:17 AM
  2. Lacewing - Sending positions for multiple enemies? +
    By GamesterX23 in forum Fusion 2.5
    Replies: 4
    Last Post: 1st January 2015, 08:14 PM
  3. Sending files using Lacewing
    By Ls2 in forum Multimedia Fusion 2 - Technical Support
    Replies: 52
    Last Post: 15th February 2013, 08:49 PM
  4. Sending colors over Lacewing and Optimization help
    By zoomingmaf in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 7th July 2011, 11:38 PM
  5. sending binary data
    By Looki in forum Lacewing
    Replies: 1
    Last Post: 3rd October 2008, 11:08 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •