问题描述:

I'm trying to create a server where some users have more rights than others. The user would send his username and password, the server would check if they are correct and assign a flag to that user.

My idea is that after the client sends the username and password, I would write the address of the socket assigned to them in a file/array and I would know that that socket is assigned to a client with admin privileges every time the clients sends an administrator request, by checking it's socket address with the 'approved' list.

Is there any other way to do this?

相关阅读:
Top