1
I have a question regarding identifying socket. Let’s assume I have 2 "socket types", a customer and an attendant. Where the 2 chat is done, I can have several clients and several attendants, but my question is, how to identify each one?
I’m doing it this way, but I don’t know if it’s good practice or if there are better ways.
I have the Server class, which receives the Socket and instance a Class Gerencia_Socket
, when receiving the first message, defines if the socket is a client or attendant, if it is a client, creates an object of type Gerencia_Cliente
, where you have all the customer information, if you are an attendant Gerencia_Atendente
, with the information of the attendant.
Is it feasible to do this? Because I already have 6 classes
Servidor
Gerencia_Socket
Gerencia_Cliente
Gerencia_Atendente
Atendente
(Socket himself)Cliente
(Socket himself)
Thank you in advance !
Thank you for the reply :)
– saidmrn