Git Product home page Git Product logo

Comments (3)

tech10 avatar tech10 commented on September 17, 2024

I haven't considered adding any such limit on my server for message length at the moment. Ideally, the goal with this one would probably be to have TeleNVDA itself have the ability to block file transfers while ensuring compatibility with official or unofficial servers alike, though given how servers send data to other clients, I'm not sure this one is possible at anything other than connection negotiation. Also, I'm not sure what TeleNVDA might or might not add in the future that others may or may not want blocked or altered on the server side, so for now, I was planning to leave this one as a non-existent option.

There's other problems with this particular situation, as well. The way in which messages are received by the server won't allow me to check the length of a received message until it's been fully received with a new line character at the end of the message. If a client sending the 10MB of data is going to be billed for it at that time, then they'll already be in trouble before they can even be disconnected from the server, since the server will only know if they've sent 10MB after it's already been fully transmitted and received. The only thing this might help is the other clients receiving such data, which could occur whether or not they're using TeleNVDA. Of course, if they aren't using TeleNVDA, the information is silently ignored if it's a file being transferred.

Additionally, there is one other consideration to take into account. My server won't send information to all slaves or masters that are connected, either. Only one computer being controlled at one time would receive any file transfer, even if several people are controlling that specific computer. Of course, if several people controlling the computer were to receive a file being sent from the computer being controlled, that's another matter entirely, they'd all receive that in such a case.

What if someone else on the same server wants to send 10MB without being blocked? The only way to block this is a global setting within the server for everyone, not just clients on a specific channel. Also, there's no way to know and set dynamically on the server side, whether a specific client can or cannot receive 10MB of data being sent by another client, I'm sure that would be the next step for such a feature, since some clients may not have a problem receiving the data while others could be billed for the traffic, and in such a case, why not allow those who can receive it to receive it, and those who can't, not to receive it.

There's a few different things to be considered for this feature, as you can see, before I'd be willing to consider adding it at this point. You're welcome to leave this open for a while, and if anything on the side of TeleNVDA changes, I'll consider how I might want to implement if it's to be added.

Thanks for bringing this up, though, I appreciate the suggestion.

from nvdaremoteserver.

cary-rowen avatar cary-rowen commented on September 17, 2024

Hi @tech10

Thank you for your attention to this issue.

How does the python version of the server program do this? Is it of any reference value?

Cheers
Best

from nvdaremoteserver.

tech10 avatar tech10 commented on September 17, 2024

@cary-rowen
The Python version of the server receives an entire message in a buffer, like I do, if I remember correctly. If the message is over the length used to limit it, the server will terminate the client's connection with no warning, since none can be provided. Everyone else will simply think the client disconnected, and they won't receive the long message. So, unfortunately, as I've described above, the client will still have to send the entire message before the server can determine if it's too long and drop it. This also wouldn't prevent the client from sending multiple smaller messages in chunks that could equate to an equivelant sized large message, though since this was targeted to file transmission, that's probably unlikely.

I did look at the Python version of this, and it didn't seem like the best way of doing things. They're attempting to support a feature that isn't really supported by NVDARemote or its variance. I'll still be checking to see if this is supported by the NVDARemote addon in the future, and if it is, I'll consider implementing support for it on my server. Until then, though, I'd consider any solution for this proposed thus far, to be rather clunky. If you have any better ideas on how this could be implemented, you're welcome to propose them here.

from nvdaremoteserver.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.