Online Snake Snake

Summary Suddenly I found that my snake was not online yet, so I made up a simple online snake program. Main Implementation Requirements The server's user link logic (main loop) and game run logic (in n threads) maintain a customer information vector s and a game information map. A match can have two users (as many as possible can expand ...

Posted by carefree on Thu, 14 Oct 2021 09:14:24 -0700

select model for IO reuse

IO multiplexing IO reuse is a very important technology in linux system. I think the understanding of reuse here is that a single process or thread can process multiple IOS in a certain mode, rather than one process or thread only processes one io. Generally, when processing socket communication, a thread or process either blocks and waits the ...

Posted by paddycallaghan on Thu, 23 Sep 2021 17:54:44 -0700