0

While working on a server-client simple chat application I've encounterd in an issue. I can't figure out how to display online users to the connected clients.

The server has a string vector containing each of the connected users name. On the client I have a Textarea of online users which I want to display the current connected users ofcourse.

Since code is a bit lengthy, I'll post it using pastebin.

Server Code

Client Code

I think it's might be importent to mention, the server and the client are in different projects.

4

1 回答 1

1

显然,服务器必须将信息发送给客户端。客户端是否应该要求服务器发送信息,或者服务器应该自发发送信息(例如,当其他客户端连接或断开连接时,或定期发送)由您决定。

于 2013-05-02T00:00:36.547 回答