• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Junilu Lacar
  • Martin Vashko
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Scott Selikoff
  • salvin francis
  • Piet Souris

Request for ideas - Distributing images to clients

 
Rancher
Posts: 3623
34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would like to have an app that allows a server to send screen images to several clients when the server has created a new image.
I was thinking of a design where the clients are continually polling the server asking for the next image.  When a new image is available, the server would send it to each client as a response to the query. Somehow the server would need to keep track of what image has been sent to what client so duplicates would not need to be sent.

One idea - some javascript code that asks the server for an image and if found and returned by the server is shown.  The images names would end with an incrementing number: 1,2,3,....  A program on the server would create and save the next screen shot with the next available name.  When the asking JS code gets a 404, it leaves the current image being shown and waits a short time before asking for the image again.

My usage of the programs would be for presenting screen shots of what is shown on my PC to the PCs in our clubhouse to be shown on the TVs that those PCs are using for monitors while giving a presentation to an audience.  Also anyone in the audience could also connect to my server to see the screens on their tablet or phone.

Thanks,
Norm
 
Norm Radder
Rancher
Posts: 3623
34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here's what I have come up with.  The server is Tomcat.  I have a program the uses Robot to capture the screen and write the image into a folder inside tomcat.
The user loads a html page that uses js to poll the server every so often for the next image. Images are saved with an incremented suffix number.
The code was copied from a SlideShow app and may have a few leftovers from that.
index.html


ShareScreen.css


ShareScreen.js
 
I am not young enough to know everything. - Oscar Wilde This tiny ad thinks it knows more than Oscar:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!