update socket api again, add unsync method for cleanup