HessianD
Radu
radu.racariu at void.space
Tue Jun 5 04:10:49 PDT 2007
I've updated the project to use:
tango.util.time.WallClock,
tango.util.time.Clock,
it works with tango 0.98 RC2.
Please download hessiand again.
Simen Haugen wrote:
> I cannot compile it. You're using tango.util.time.Utc, and in my tango trunk
> that file doesn't exist.
>
> "Radu" <radu.racariu at void.space> wrote in message
> news:f3f7n3$1r10$1 at digitalmars.com...
>
>> HessianD (http://www.dsource.org/projects/hessiand/)
>> A D implementation of the Hessian (http://caucho.com/hessian) binary web
>> service protocol.
>> Supports both the client and the server model.
>>
>> Client sample:
>>
>> import hessian.HttpProxy :
>> HttpProxy;
>> import tango.io.Stdout;
>>
>> char[] echo(char[] param);
>>
>> void main ()
>> {
>>
>> // create a Http proxy on the given Http endpoint so we can post
>> our Hessian stream
>> scope service = new HttpProxy("http://localhost:5667/hessiantest");
>>
>> // create a proxy method that will do the Hessian serialization
>> and deserialization
>> auto _echo = &service.proxy!(echo);
>>
>> // we'll perform the remote call and display the result
>> Stdout ("Remote result: ") ( _echo("Hello World!") ).newline.flush;
>>
>> }
>>
>> Server sample:
>>
>> import hessian.HttpServer:
>> Server;
>>
>> class impl
>> {
>> char[] echo (char[] param)
>> {
>> return param;
>> } }
>>
>> void main()
>> {
>> // create a Http server on the given port
>> auto server = new Server(5667);
>> // attach a context with the Http endpoint and the class
>> implementing the method
>> auto context = server.addContext!(impl)("/test/hessiantest");
>> // bind the method to the context created
>> context.bind!(impl.echo);
>> // and finally start listenning to Http Post requests
>> server.start;
>> }
>>
>>
>>
>>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.puremagic.com/pipermail/digitalmars-d-announce/attachments/20070605/82357f92/attachment.htm
More information about the Digitalmars-d-announce
mailing list