Properly close socket on WIN32 to allow accepting further connections
Reindent all source files
The indentation of various st-link source files is highly inconsistent.
Reindent all source files to 4 space indentions for consistency.
I went with 4 space indentations, as it was the most common style.
wrap read/write socket functions on mingw
undefine macros for socket redirection, fix warnings
use correct headers
build with mingw