User Tag List

Page 2 of 2 FirstFirst 1 2
Results 11 to 19 of 19

Thread: Simple File Transfer

  1. #11
    No Products Registered

    Join Date
    Jul 2006
    Location
    Newcastle, England
    Posts
    78
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Simple File Transfer

    How big is a binary allowed to be ?

  2. #12
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Re: Simple File Transfer

    Quote Originally Posted by Jamie
    the Lacewing maximum message size is around 65500 bytes
    Working as fast as I can on Fusion 3

  3. #13
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module

    Join Date
    Jun 2006
    Posts
    6,773
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: Simple File Transfer

    But if you split it up into multiple messages, you could send a "binary" as big as you want.

  4. #14
    No Products Registered

    Join Date
    Jul 2006
    Location
    Newcastle, England
    Posts
    78
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Simple File Transfer

    Right, yeah okay I'll try that.

    It's just the binary splitting business I'm not that familiar with but I'll play around a bit.

  5. #15
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Re: Simple File Transfer

    Really all you need to do is keep track of the position in the binary you are sending from, and make sure not to send too much binary when you reach the end of it.
    Working as fast as I can on Fusion 3

  6. #16
    No Products Registered

    Join Date
    Jul 2006
    Location
    Newcastle, England
    Posts
    78
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Simple File Transfer

    So- forgive my not knowing anything- you send strings from the file/binary piece by piece as long as its less that 65500 bytes and reassemble the file at the receiving end ?

    I notice on your original file sender, LB, you set the SendBytesSize at 416 ie. 416 bytes each time ... is that number significant ?

    I feel I'm being awfully dim but it'll click soon hopefully :P

  7. #17
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Re: Simple File Transfer

    That number was very low, I now have it set to about 16384, and that's as far as I wanted to go because that number already makes it lag a little bit. However it's only because the method I used was very poor; I am no designing a file sender example which I hope will show a better way to do it.

    The number is not significant at all, as long as your application isn't lagging a whole lot from it.

    As I said before, just load the file into the binary object with the binary quickload object, and then use Lacewing's Push Binary action to push binary from the binary object. The binary object has an expression to get the address of the data, then you just add the offset to it for each file chunk. And for the size, you just have to make sure that you don't send more data than there is in the file. Be aware of the fact that there are not very many files that have a size that is an exact multiple of the size of each chunk you're sending; the last chunk of the file will generally be smaller than the chunk size.

    And by chunk I mean how many bytes you send at a time.
    Working as fast as I can on Fusion 3

  8. #18
    No Products Registered

    Join Date
    Jul 2006
    Location
    Newcastle, England
    Posts
    78
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Simple File Transfer

    I definitely understand the theory now, I don't understand binary enough yet though I think - I'll do some reading!

    I look forward to your new example :-)

  9. #19
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jun 2006
    Location
    Darlington, UK
    Posts
    3,298
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Simple File Transfer

    If you are sending data using TCP (which you'd be insane not to for files) then send the Lacewing max each time. TCP automatically splits and joins individual sends to match the max packet size, so you get the least overhead by sending as much as you can at a time.

Page 2 of 2 FirstFirst 1 2

Similar Threads

  1. File transfer
    By Ls2 in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 3rd September 2011, 03:53 AM
  2. File transfer
    By Flo in forum Lacewing
    Replies: 1
    Last Post: 12th November 2009, 07:06 PM
  3. file transfer
    By haim in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 23rd May 2008, 02:51 PM
  4. Network chat/file transfer client?
    By Mantis in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 7th March 2008, 02:19 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
  •