communcation by blocking socket api