From: stephan b. <st...@s1...> - 2004-12-21 17:02:36
|
As of about 20 minutes ago: ps11n now supports 7 data flavours and 4 data transport layers: the usual streams and files, and now http and ftp. Convert file in.paren using s11n over ftp: stephan@owl:~/cvs/s11n.net/ps11n/src> s11nconvert -f in.paren -o ftp://stephan:password@localhost/x.s11n -s pio --pio-serializer=funxml stephan@owl:~/cvs/s11n.net/ps11n/src> cat ~/x.s11n <!DOCTYPE SerialTree> <somenode class="NoClass"> <<snip>> </somenode> Loading the data over ftp: stephan@owl:~/cvs/s11n.net/ps11n/src> s11nconvert -f ftp://stephan:password@localhost/x.s11n -s funtxt -S pio #SerialTree 1 somenode class=NoClass { <<snip>> } Reminder: s11nconvert is just a convenience tool for testing here. Calling the following from C++ would also work: P::s11n::save( myobj, "ftp://user:pass@host/path" ); MyT * obj = P::s11n::load_serializable<MyT>( "ftp://..." ); Getting over http now works using the same Serializer: s11nconvert -f http://s11n/P.s11n -s compact -S pio 51191011 <<snip>> 51190000 Writing over http "might" work - i don't yet know because i don't know how to tell the http side to react accordingly. (@Christian - any tips on how to set up the http side of a IORequest_Put?) Transparent network support is pretty frigging cool. The IOManager allows us to handle http and ftp with a single Serializer class, and that this one can support any protocols which P::IOManager handles. file:// URLs "should" work, but there's aparently a bug in the file:// handler: s11nconvert -f file://$HOME/x.s11n -s compact -S pio --pio-verbose PIOSerializer.cpp:42 : pio-verbose mode is on. PIOSerializer.hpp:61 : deserialize() from [file:///home/stephan/x.s11n]... PIOSerializer.hpp:144 : NetDbError: pnetdb.cpp:343:static P::NetDb::ServiceEntry P::NetDb::serviceByName(const std::string&, const std::string&): Could not resolve service by name: Resolver Error 0 (no error) PIOSerializer.hpp:64 : deserialize(): read_content() failed :( s11nconvert error: Error loading node tree from input stream! See ya! -- ----- st...@s1... http://s11n.net "...pleasure is a grace and is not obedient to the commands of the will." -- Alan W. Watts |