There can be several instances of my service on the same computer, each of them on a different port.
How can I retrieve the port number from which the current request came through to differentiate them?
To clarify, if client is calling the following method:
class OrdersService : MarshalByRefObject
{
public void EnqueueOrder(Order order)
{
//int port = ??
}
}
I need the port number from which the request was made.
PS: I tried implementing the IServerChannelSink interface but it can only access the URI (like /foo/bar) and IP address of the client.
Thanks