Branch: Tag:

1997-09-23

1997-09-23 17:30:54 by David Kågedal <david@kagedal.org>

Klarar nu både synkrona och asynkrona anrop.

Rev: lib/modules/Remote.pmod/call.pike:1.2

5:   string name;   object con;   object ctx; + int is_async;      mixed `() (mixed ... args)   { -  return con->call_sync(ctx->encode_call(objectid, name, args)); +  mixed data = ctx->encode_call(objectid, name, args, is_async); +  if (is_async) +  con->call_async(data); +  else +  return con->call_sync(data); +  return 0;   }    - void create(string oid, string n, object cn, object ct) + mixed sync(mixed ... args)   { -  +  mixed data = ctx->encode_call(objectid, name, args, is_async); +  return con->call_sync(data); + } +  + void async(mixed ... args) + { +  mixed data = ctx->encode_call(objectid, name, args, is_async); +  con->call_async(data); + } +  + void create(string oid, string n, object cn, object ct, int a) + {    objectid = oid;    name = n;    con = cn;    ctx = ct; -  +  is_async = a;   }