protected override object GetInstance(IWampClientProxy <TMessage> client, WampSharp.Core.Message.WampMessage <TMessage> message, WampMethodInfo method) { IWampBindedRealm <TMessage> realm = client.Realm; if (realm == null) { return(base.GetInstance(client, message, method)); } return(realm.Server); }
protected IWampClientProxy <TMessage> GetWampClient(IWampSessionClient client, string realm, HelloDetails details) { IWampClientProxy <TMessage> wampClient = client as IWampClientProxy <TMessage>; IWampBindedRealm <TMessage> bindedRealm = RealmContainer.GetRealmByName(realm); wampClient.HelloDetails = details; details.TransportDetails = wampClient.TransportDetails; wampClient.Realm = bindedRealm; return(wampClient); }