예제 #1
0
 public T GetActorRef <T>(string name) where T : ActorRef
 {
     return((T)Global.GetActorRef(typeof(T), name, null, Global.Host));
 }
예제 #2
0
        //public T GetService<T>(string hostName, string ip, int port) where T : ActorRef
        //{
        //    var refTypeName = typeof(T).Name;
        //    string name = refTypeName.Substring(0, refTypeName.Length - 3);
        //    IPEndPoint ep = new IPEndPoint(IPAddress.Parse(ip), port);
        //    return (T)Global.GetActorRefByAddr(typeof(T), ep, hostName, name,  null, Global.Host);
        //}

        public ActorRef GetHost(string hostName, string ip, int port)
        {
            IPEndPoint ep = new IPEndPoint(IPAddress.Parse(ip), port);

            return(Global.GetActorRefByAddr(typeof(ActorRef), ep, hostName, "", null, Global.Host));
        }
예제 #3
0
 public T GetAvatar <T>(string uid) where T : ActorRef
 {
     return((T)Global.GetActorRef(typeof(T), uid, null, Global.Host));
 }