Scott, Oskar and I have done the client protocol (in spec, wrose code hopefully following soon)
At the risk of seeming like we're just handing this down to you - we are just going to hand this down to you ;) (it's also in the wrose CVS under docs/) AGL -----fnclispec----- Freenet Client Protocol Spec A client opens a socket to a node. The transport is unencrypted and FNP format messages are exchanged. Numbers are always hexencoded. Feilds in square-brackets are optional. The protocol has state in the connection. Only 1 GET/PUT per connection. Connections are torn-down after a transaction has taken place. Getting ------- (Client->Node) ClientGet URI=<string: fully specified URI, such as freenet:KSK at test.html> HopsToLive=<number: HTL> End at this point the client is in WAITING state: (Node->Client) The node returns one of the following: DataNotFound [Reason=<string: freeform>] EndMessage OR RouteNotFound [Reason=<string: freeform>] EndMessage OR DataFound DataLength=<number: number of bytes of metadata+data> [MetadataLength=<number: default=0: number of bytes of metadata> END if ClientReply is sent the data is chunked in a series of Data messages: DataChunk Length=<number: number of bytes in trailing feild> Data <@Length bytes of the data> at any time when the full payload of data hasn't been sent then you can get: Failed [Reason=<string: freeform>] End In which case goto WAITING state. Otherwise the transaction is complete and the connection dies Insering -------- (Client->Node) ClientPut URI=<see ClientGet> [MetadataLength=<number: default=0: number of metadata bytes>] DataLength=<number: number of bytes of metadata+data> Data <@DataLength number of bytes> After this the client gets one of the following: (Node->Client) KeyCollision [Reason=<string: freeform>] End OR RouteNotFound [Reason=<string: freeform>] End OR DataRejected [Reason=<string: freeform>] End OR Sucess End At this point the connection dies ----- _______________________________________________ Devl mailing list Devl at freenetproject.org http://www.uprizer.com/mailman/listinfo/devl
