fix some bugs

add  testServer and testClient
fix bugs
update