It explains how to use PIDL output.
If you do 8. Set PIDL compile on Mono
, you can create output easily.
Unlike C++ version, Stub is delegate at DotNet version.
Include PIDL compile output to project first.
Creates class such as Proxy, Stub, etc that included in output.
Set delegate for each function from Stub objects of class from above.
Example
//Creates including output of PIDL compile. SynchWorldC2C.Proxy c2cProxy = new SynchWorldC2C.Proxy(); SynchWorldC2S.Proxy c2sProxy = new SynchWorldC2S.Proxy(); SynchWorldS2C.Stub s2cStub = new SynchWorldS2C.Stub(); SynchWorldC2C.Stub c2cStub = new SynchWorldC2C.Stub(); ... void Start () // You do not have to it on Start but I suggest do it from here because it is easier. { //Set Event delegate of netclient netClient.JoinServerCompleteHandler = OnJoinServerComplete; ... //Set delegate that handling stub. s2cStub.NotifyLocalHeroViewersGroupID = NotifyLocalHeroViewersGroupID; //<- Set following function. //Set same function as followed. s2cStub.RemoteHero_Appear = RemoteHero_Appear; s2cStub.RemoteHero_Disappear = RemoteHero_Disappear; c2cStub.P2P_LocalHero_Move = P2P_LocalHero_Move; //attach proxy,stub to client. //Warning!!! If you do not attach, it will not work. netClient.AttachProxy(c2cProxy); netClient.AttachProxy(c2sProxy); netClient.AttachStub(s2cStub); netClient.AttachStub(c2cStub); ... } //Create function for delegate. bool NotifyLocalHeroViewersGroupID(Nettention.Proud.HostID remote,Nettention.Proud.RmiContext rmiContext, Nettention.Proud.HostID localHeroViewersGroupID) { ... return true; }