Closed kedrin closed 7 years ago
Hi,
Server can define more than one service in a single endpoint. There is no way to get service type in the client. It's expected that your client code already knows the service type it will use.
No i need to know which service type is being connected to on the server side.
say IPhoneBookService1 and IPhoneBookService2 service trigger the same connection event, how do i know which service is doing it?
When a client connects to an endpoint that has more than one service, the client connects them in the same time. So, you don't need to know the service, because connection is independent from services.
Yea, i gathered that after digging through the code, I was just hoping there was a way to know which service was being going to be used before hand on the connection event. It explains why what I had modified returned all services during the connection. Thanks anyway.
When using ScsServiceBuilder, is there a way to get the service type back on client connection? I am trying to get what service was connected to returned during the ClientConnected event.
For instance the client connecting to server.AddService<IPhoneBookService, PhoneBookService>(new PhoneBookService());
The connection evernt should also return they type PhoneBookService's type name