Why not just

vlc.net.send(fd, "pause\n")