add some functional tests for socket connection