fixes for enabling build on FreeBSD

git-svn-id: svn://localhost/project_picapica/trunk@252 fb96df88-216d-11de-830c-f3023f12d8ac
debug log messages for opening and closing socket events

git-svn-id: svn://localhost/project_picapica/trunk@253 fb96df88-216d-11de-830c-f3023f12d8ac
set SO_REUSEADDR on listening socket

git-svn-id: svn://localhost/project_picapica/trunk@254 fb96df88-216d-11de-830c-f3023f12d8ac