ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi, I am back to working on my remote-vehicle project that I started a while ago and realized that using a cgi script like the one I had trouble with earlier here might not be the best route. Average delay would be around 1 second, while I can ping the server in ~30ms. My goal here is to simply have the server take the input and run
#/usr/sbin/lptest $input
With it. Im working on a javascript to take keyboard input, but I have no idea how to send out the data quickly. Forms are not made for this sort of thing. I guess I could write a little program, but that means I have to take what little I know about C++ and expand it 1000 times.
What other options do I have here? Is there a way I could make the form post faster with less information passed back and forth? Or how else could I incorporate it into an html that would take a javascript-set variable? Thanks
Originally posted by bigearsbilly Does that mean you are interacting with something
via a web browser?
If so, you will never get a quick response time.
You'll have to knock up your own client and server
using sockets.
Oh, great. I can deal with that I guess but... where do I start? I don't have any experience whatsoever here
well.
First choose you language.
perl definitely has socket functions,
tcl too, python I should imagine.
C of course but it's easire to do one in a scripting language.
I would try maybe tcl/tkbecause you can have a form interface up
in a trice.
If you imagine your socket as a pipe or fifo then generally you would
read it in a line oriented fashion exactly like reading a config file.
You could use simple name/parameter pairs on a line send to socket
and read the other end.
I brushing up on some Tcl tutorials, no specifics on sockets yet though. Would this totally go around a web browser, as you said for speed? How would the client use the tcl script then if they were in windows, would they need to download something to run the Tcl script? This is a great start, Ill keep reading thanks
I just found a tutorial on Tclhttpd ; would a tcl web server be the way to go? I also have a webcam serving pictures through my current apache server; Maybe this is a dumb question, but is there a way to serve the image via a socket and increase the transfer time?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.