10-11-2009 03:35 AM
How do I do so that the client takes the control of the system?I want to realize both a server that to forehead of the applications it furnishes some data to the clients however also of the clients that actively act on the program and the server saves the changes.
In the examples I don't find anything
10-11-2009 10:12 AM
Hey there examples like shared variable and tcp communication Active-Passive in example finder.
Client-Server Model is possible with shared variables..
Post back for any queries..
Thanks
Prashh
10-12-2009 05:27 AM
10-12-2009 06:38 AM
Hey, For TCP communication, search for TCP in example finder, then u can find TCP communicator- Active and TCP communicator-Passive
For shared variable, search for shared in example finder, then u can find shared variable client-server.lvproj
--> For ur client to download a file from server, U can put control in client VI, when this command is given to the server through shared variable, Server VI can send an html link to client VI through another shared variable. Now, this link will be displayed in an indicator in client VI. The user can copy the link and paste it in browser to download a file.
I will try to send this example
Thanks
Prashh
10-12-2009 06:54 AM
Fantastic. I can directly send the file through TCP..I have seen the example server.vi.
But the communicator furnishes an answer to what the server it gives to the client. Can I do so that the client has the visualization as does it ask for it?In practice I would want the client to visualize data modifying some parameters. Can I do this?
10-12-2009 09:20 AM
I have tried to see the example server.vi, but I could not find it.
Where is it... in example finder.
10-12-2009 09:24 AM
As per my knowledge, we can not send a file directly through TCP...
If u find any example which does this task, just let me know...
Thanks
Prashh
10-12-2009 10:40 AM
oh yes of course...http://zone.ni.com/devzone/cda/epd/p/id/2842
My problem is as I do to furnish to the pc1(server) from the pc2(client) the instant in which to furnish me the file. I could use a control (a button for example) which once pushed it gives the consent to the transfer of the file...but as I do to do so that the pc1 starts the transfer if I crush the button on the pc2? Besides I would want to do so that the client you visualize the data furnished by the tools to the server (for example about the numerical values) and that at the same time however me from client therefore from pc2 (then from distance pc) such data are visualized even changing a parameter (for example the time of acquisition).
How can I do it?
I hope to be explains me
10-12-2009 11:19 AM
You could create a simple messaging protocol over a TCP connection to accomplish what you need. Alternatively uou could use network queues. Either way you need to define some form of messaging so that each end of the connection knows what is happening. The queues are nice in that they naturally provide synchronization for your application. If you need bi-directional communication then both your server and your client would need to have a message queue. If you use straight TCP both your client and your server could be listening on their end of teh connection (once it has been established) but as I mentioned you will need some form of messaging protocol so that the client and server know what data they are receiving and what they will need to do with it. While you can simply dump the file over the connection it is generally helpful to let the receive know how many bytes of data they should expect to receive. This is where a simple messaging protocol is useful.
The protocol can be as basic as a fixed length message ID, followed by a fixed length data length and followed by the data when the data length is greater than 0.
10-12-2009 11:26 AM