code modify for server interface to deal problem that data not complete receive