refactoring idobata_server
add error check 'wait_sock_readable()'
fix #8