socket communication protocal based on readline