The general library
write and read method in TCP stream