Closed LogicalFailure closed 1 year ago
This property exists, but unfortunately the type that is holding it is internal, so you will have to use reflection.
private static void OnSessionCreated(object? sender, WampSessionCreatedEventArgs e)
{
Console.WriteLine(e.SessionId);
WampTransportDetails transportDetails = e.HelloDetails.TransportDetails;
PropertyInfo peerProperty = transportDetails.GetType().GetProperty("Peer");
object? peerValue = peerProperty.GetValue(transportDetails);
Console.WriteLine(peerValue);
}
Thanks that worked :)
Hi I would like to get the IP address of a client in the session created event on the router for logging purposes how would I go about this?
Please consider the following code (I want to access the clients IP address in the parts where it logs their session ID):