send and receive buffer through network socket in nodejs