NetTalk Central

Author Topic: D/load a file - Is this possible w/ NetSimple-Server /-Client or WebServer only?  (Read 18998 times)

Wolfgang Orth

  • Sr. Member
  • ****
  • Posts: 251
    • View Profile
    • oData Wolfgang Orth
Another long question for a short answer:

We have a NetSimple-Server, permanently connected with dozends of NetSimple-Clients over the internet.

Once in a while a message is sent from the server tothe clients and a window pops up. Typical messenger... but one-way from Server to Client, works flawlessly.

New demand: sometimes there will be offered a file to be downloaded (PDF)

Is this d/l-scenarion possible with this existing NetSimple-Server/Client-Combo

or

does such a download require a WEB- / FTP-Server solution instead of NetSimple-Server.

Is the existing NetSimple-Client able to download from a WebFTP-Server or is a separate WebClient necessary?

I hope I described my intention clearly and precise.

Thanks in advance,
Wolfgang

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Hi Wolfgang,

I think you need to describe the problem more carefully. I'm not sure whether you want to send the file from the server to the client, or vice versa.
Is the client connected to the server at the time? Is the client "requesting" the file?

Cheers
Bruce

Wolfgang Orth

  • Sr. Member
  • ****
  • Posts: 251
    • View Profile
    • oData Wolfgang Orth
Hello Bruce,

sorry for being not clear.

Right now the Server pushes messages (actualy a group over a string) to all listening Clients. They listen permanently. As soon as the message arrives the client displays it on a popup window.

The idea is to add a binary file (PDF, 50 kB to unknown size) to some of the pushed messages. In the meantime I lean towards pushing an XML-structured kind of message, because I think we could stuff these binary data into this structure. This would be the solution.

The binary could be stored as a file. With an API.call I can detect a PDF-reader being installed, then I could display the stored file, either instantly or it get added to a list of received files for later viewing.

As far as I recall the sending of the data is in asynchronous mode, so each message should be blown over the wire fairly quick. (My guess)

I hope this dois sound more reasonible now.....

Thanks for your patience
Wolfgang

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
You can push anything you like over the connection - binary or text it makes no difference.

However since you are using the "raw" NetSimple object there's no pre-defined protocol for describing the data. So you would need to add a mechanism so the client can "know" what is coming, and indeed how to deal with it.

Using XML sounds like a good way to do it.

If it's on a LAN it should be pretty quick - yes - but of course it depends on all kinds of factors.

Cheers
Bruce