send and recv funcs finished