c++ - Multithreded udp-Server vs. Non blocking calls -
first questions here. gave searched haven't found solution answers problem here. i'm using c++ , need write kind of usp chat (server , client) programs interact 1 another. atm works quite well. i'm using googles protobuf messages. i've written that: server has list of users curently logged in list of messages process , distrubute. one thread handles receiving on socket (i'm using 1 socket). if command var in message login, looks through list , checks combination of port , ip. if not in, chat creates new user entry. if command logout, server looks user in list , deletes it. if command message, server looks if user logged in , puts on message list. the 2nd thread sending. waits till there message in list , cycles through users send messages sockets except sending one. the server has set options on socket receive ip. my question is: performat solution? i've read select , poll. it's multiple receiving sockets while have one. know receiving