2016년 5월 10일 화요일

4.2 Performance Upgrade - Completion


  • Previous Problem

Previous sources are ineffiently implemented about data send & receive.
If data is transfered by 'receive()' function, Host must wait until the host receive data.
So game'flow don't softly run.

Thus, I improved these sources as follows.

  • Improved Source
- change current socket option into non-blocking mode as using 'ioctlsocket(sock, FIONBIO, &sock_on)'
- server must wait as continuosly calling 'recevie()' function by the time opponent send data 
  
- change current socket option into non-blocking mode as using 'ioctlsocket(sock, FIONBIO, &sock_on)'



- I block what is calling send(), receive() funtions as using time. I renew opponent's data every second. Also, receive() function don't wait until opponent receive data. 

  • Result Screen (completed)





Console-based Multiplayer Tetris Game Project Completion




댓글 없음:

댓글 쓰기