Announcement

Collapse
No announcement yet.

Send File From Socket

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Send File From Socket

    Prompt please how to transfer a file from the server on the client through object Socket?

    As I understand it to begin it needs to be recoded in Base64. And how to read it later?

  • #2
    You probably need to share what you have tried so far, what plugin you're using, what kind of data the file consists of etc.
    Bas Groothedde
    Imagine Programming :: Blog

    AMS8 Plugins
    IMXLH Compiler

    Comment


    • #3
      All my tests with sockets and AMS have not been great to send files it game down to a manual http request to the file I wanted rather over the socket request but I not sure what tools your using so like IP said post what you have and people can start pocking in to it to help, that's how we all come up with different ideas to help, but we wont build the hold thing from scratch to make it work for you, we need to know what you have so we can work With you.
      Plugins or Sources MokoX
      BunnyHop Here

      Comment


      • #4
        I understand everything perfectly and do not ask to write code completely. But I can not figure out how to handle the reception of a file through the Socket plugin correctly in a loop. Suppose on the server I perform the file conversion as follows:

        local sFile = Crypto.Base64EncodeToString("D:\\MyFile.zip");

        if (sFile ~= "") then
        Socket.SetOutputQueue("Socket", client[1], sFile, 5);
        end

        Then, as I understand it on the client, I need to read this information in a 1024-byte loop, but I do not understand how to handle the incoming message correctly ...

        Comment


        • #5
          This is where I was having problems and I also found out large files would mess up I used normal sockets, luasockets and raknet sockets.

          You have not told us what sockets your using so it’s nothing to do about you know what your doing it’s we don’t know what your doing each socket option has it’s limitations.

          If you don’t want for some strange and unknown reason want to tell us what sockets your using and how your code looks for the socket part as there different ways to pack it up to send then you have to test your self see what your reply’s are on the client side, debug yourself as you ask for help and seem to tho k we can see what your doing.

          peace
          Plugins or Sources MokoX
          BunnyHop Here

          Comment


          • #6
            Honestly, I do not quite understand your question ... I'm using the Socket plug-in from the mindquake website for AMS...

            Comment


            • #7
              Honestly, I do not quite understand your question ... I'm using the Socket plug-in from the mindquake website for AMS ...

              Comment

              Working...
              X
              😀
              🥰
              🤢
              😎
              😡
              👍
              👎