How can I open a tcp connection with javascript, send data and close the connection synchronously?
I am looking for something like this
var connection = new tcpconnectio();
connection.open(ip, port)
connection.send(data)
connection.close
But synchronously , any suggestions?