The name "bsession" is a bit confusing.  Can you rename the variable to emphasize that this is the socket identity and provide some comments reminding us why we have to pass this and what it is for.