Vitaliy Margolen wrote: > Forgot this part: > >> Ismael Barros wrote: >> +static DWORD WINAPI tcp_listener_thread( LPVOID lpParameter ) >> +{ >> + for ( ;; ) >> + { >> + if ( clientSock == INVALID_SOCKET ) >> + { >> + goto end; >> + } >> + } >> + >> +end: >> +} >> > It's more cleaner to use "break;" instead of goto to exit the loop. > That is some ugly code there.
Ismael: Please use a break; to get out of the loop. It is cleaner and good code practice. James McKenzie