remove redundant socket apis
remove redundant getShouldClose