Skip to content

群发时的sleep问题 #3

Description

@Mr-whoz

在write_online_all(向所有在线用户发送消息)函数中,每向一个用户发送消息之后,都会sleep(1),假如有20个人,就得20秒,这么长的时间不符合即时通讯的意义啊。这里可不可以用多播解决一下,既不占资源,也符合即时性。

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions