Archived
This forum has been archived. Please start a new discussion on GitHub.
Newbie question about sending data
Good day, all!
I have one newbie question.
There is a task - to send a file (for example, any file in binary mode) from client to server.
How it can be done?
From where I must start to work?
What section of documentation can help me to solve this task?
Thanks a lot.
Alexander
I have one newbie question.
There is a task - to send a file (for example, any file in binary mode) from client to server.
How it can be done?
From where I must start to work?
What section of documentation can help me to solve this task?
Thanks a lot.
Alexander
0
Comments
-
Hi,
Ice includes a service called IcePatch2 that allows you to efficiently replicate a directory hierarchy across a network. I recommend that you study the IcePatch2 sources (in src/IcePatch2) for a good example of how to efficiently transfer large amounts of data using Ice.
Take care,
- Mark0 -
If i understood, IcePatch2 is using for sending data from server to client.
But in my case a one binary file from client to server must be sent.
How it can be realize?0 -
You are correct that IcePatch2 transfers files from the server to a client, but the technique it uses to transfer the file is applicable regardless of the direction in which the file is sent.
Take care,
- Mark0 -
Oh, ok. I will teach it tomorrow.
And my search in forum archive gave me next links:
http://www.zeroc.com/vbulletin/showthread.php?t=292
What is better to use: sequence or IcePatch2? (i don't want to reinventing a wheel)0 -
IcePatch2 probably isn't an appropriate solution if you are sending files from a client to a server. However, reading the IcePatch2 sources should be helpful as you implement your application.
Good luck,
- Mark0 -
Ok, i will look it.
Thanks you, mes, for you answer.0 -
I have one new question: can I call a function which realized on client without using some server part on a client side?
In detail: client call thrue proxy a function on server and give for him a proxy to function (ClientFunc* func) in parameter. After that server must call received function on client. Еhere is no need to use asynchronous working.
How it can be done?0 -
Yes, you can do this. The callback example in demo/Ice/callback demonstrates how to do this. Note that this example requires that the server establish a new connection back to the client. An alternative is to use a bidirectional connection, which is shown by the example in demo/Ice/bidir.
Good luck,
- Mark0 -
Thanks, I must keep my eyes more openly.
Is every callback function must have void declaration?0 -
AlexKom wrote:Is every callback function must have void declaration?
- Mark0 -
Ok, thats work excelent. I get a callback example and modify it a little. I get what i want.
Thanks a lot for your help, Mark!0