is-tls

1.0.0 • Public • Published

isTLS

check if a socket's first packet is secure

Example

server.on('connection', function(socket){
  socket.once('data', function(packet){
    if (isTLS(packet)) {
      doSecureStuff()
    } else {
      doInsecureStuff();
    }
  });
});

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i is-tls

Weekly Downloads

1

Version

1.0.0

License

MIT

Last publish

Collaborators

  • stephenmathieson