c# - Get Behavior instance from Sessions? -


if understand correctly, everytime there connection request, behavior instance initialized. save information extended behavior class. however, want send message some connected client (for example, behavior instance have property productbehavior.type == producttype.main).

how can achieve this?

        foreach (var session in this.sessions.sessions)         {             // how behavior instance here, can property value?         } 

the session iwebsocketsession, , behavior implement interface. session variable in foreach behavior. need cast our behavior:

    foreach (var session in this.sessions.sessions)     {         mybehavior b = session mybehavior;         //     } 

Comments

Popular posts from this blog

javascript - three.js lot of meshes optimization -

smartface.io - Proper way to change color scheme for whole application -

Email notification in google apps script -