You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For current user an instance might be available from req.user. Any another user has to be available from req.socket.user(userId). For unavailable user it has to return undefined. If no user connection -- user instance has to be destroyed.
User instance has to contain few vars and methods.
interfaceUser{getid(){}// returns userIdgetsession(){}// get session data for usersetsession(){}// set session data for usergetlength(){}// returns a number of user connection in current state.getconnections(){}// returns a list of available connection instancesget(url,body){}// make get request to clientpost(url,body){}// make post request to clientput(url,body){}// make put request to clientpatch(url,body){}// make patch request to clientdelete(url,body){}// make delete request to client}
The text was updated successfully, but these errors were encountered:
For current user an instance might be available from
req.user
. Any another user has to be available fromreq.socket.user(userId)
. For unavailable user it has to returnundefined
. If no user connection -- user instance has to be destroyed.User instance has to contain few vars and methods.
The text was updated successfully, but these errors were encountered: