Add secure method to tcp socket typescript interface

Add secure method to tcp socket typescript interface