The DataShare service is slightly more complex then most services because it creates state that hangs around for a while. It is designed to be robust in the sense that if all the world tried to download MyGreatDocument.pdf the DataShare would remain robust and secure and available.
The get message is a ListObject that contains a ListObject named "path" and an INT8 object named "priority". The message also has the string "id" included to identify exactly which request is being talked about. When a get message is sent the connection is no longer used for anything but the data transfer. The connection is then dropped at the end of the transfer. Future work will probably be to allow bunk gets by including many paths or creating a "getlist" messages.
The server will then send back "data" messages, "sleep" messages, "start" messages and possibly other signalling information. The only messages of great interest are the data messages which are of type DataSegment. When the last DataSegment is recieved the file is complete.
The start message indicates the start of a file indicated by the "id" field in the get or put request. The sleep message indicates that a transfer has been put to sleep for an amount of time and the connection should not expect traffic any time soon.
The put request is slightly more complicated. It has all the things the get does, but does not require a priority since the reciever cannot manage the throughput of a Call without adversly affecting the entire Connection the call arrives on. The sender must wait for "start" message from the server or an "error" message before taking another action (unless ofcourse a timeout is reached).
After this the transfer proceeds like a normal SendJob. The reciever may simply want to create a thread to handle the incoming work.
If a DataObject named "error" is returned it will have a integer code named "code" and will optionally be followed by the string object "error message".