added SO_REUSEADDR flag to socket