add harbor query api

This commit is contained in:
云风
2012-08-30 17:52:44 +08:00
parent 4610781498
commit 161528e686
5 changed files with 31 additions and 0 deletions

View File

@@ -153,6 +153,15 @@ skynet_context_push(uint32_t handle, struct skynet_message *message) {
return 0;
}
int
skynet_isremote(struct skynet_context * ctx, uint32_t handle, int * harbor) {
int ret = skynet_harbor_message_isremote(handle);
if (harbor) {
*harbor = (int)(handle >> HANDLE_REMOTE_SHIFT);
}
return ret;
}
static int
_forwarding(struct skynet_context *ctx, struct skynet_message *msg) {
if (ctx->forward) {