Pass the file to pluginMessage

Discussion in 'Plugin Development' started by LIMPIX31, Aug 31, 2021.

  1. Offline

    LIMPIX31

    I need to transfer a file from server to client via pluginMessage.

    For example:
    /download server.properties

    It works with small files, but if the file is larger, as I understand it, 8 megabytes, then the packet is not transferred. I came up with the idea of splitting the file transfer into 1KB packets, but I'm a little confused about the implementation. Can you tell me what to do, preferably with a code. If transferring large packets is terrible, then tell me how to do it differently, but do not suggest using third-party APIs for this (dropbox, etc.)

    P.S. I am passing bytes to a JSONObject, with the key file and encode the byte array to a string and then decrypt on the client.
     
  2. Offline

    timtower Administrator Administrator Moderator

  3. Offline

    LIMPIX31

    I study packets and it became interesting to do this
     
  4. Offline

    timtower Administrator Administrator Moderator

    @LIMPIX31 Considered just starting an FTP server?
    Sounds like you are doing something very complicated for a task that will never get used.
     
  5. Offline

    LIMPIX31

  6. Online

    davidclue

    @LIMPIX31 So you actually manipulate clients' computers and download a text file to their computer from a plugin already?
     
  7. Offline

    LIMPIX31

    ? What. Since all the same how to transfer a lot of bytes using pluginMessage
     

Share This Page