Home > Software engineering >  How to realize MFC chat online users list
How to realize MFC chat online users list

Time:10-04

If inscribe
Vc + + 6.0 to use MFC to write a group chat applet
How to realize the online users list?

CodePudding user response:

Client login server first and then the service side found a new user login, send all online client information to the client?

CodePudding user response:

Connnect client server, the server will updated list is sent to all connected clients,

CodePudding user response:

With a CMap and maintain customer information such as IP,

CodePudding user response:

This is to do the stronghold of qq

CodePudding user response:

MFC can use CMap commonly, do key username, other user information value, convenient search,
Then put in a CList,

CodePudding user response:

There must be a central data server, client logged in, the server section of the real-time online number to the client,
When someone quit/login server to each client sends the user offline/online notice, the client local update list of real-time online,
I have written part of the code, reference,

CodePudding user response:

I remember I have done a long time ago, there is no server, the program to run with a radio, the program exits and sends a broadcast,
After we received as someone online/offline, of course, this radio will contain some user name, IP, online or offline markers and so on information
You can search the UDP broadcast ""

CodePudding user response:

refer to 7th floor dingxz105090 response:
I remember I have done a long time ago, there is no server, the program to run with a radio, program exits and sends a broadcast,
After we received as someone online/offline, of course, this radio will contain some user name, IP, online or offline markers and so on information
You can search for the "UDP broadcast"

Just network can, if done segment routing, or on the public large (IP), is not the reality

CodePudding user response:

Send heartbeats to sever side
  • Related