@@ -40,6 +40,7 @@ const messageUtf8 = 'x√ab c';
4040const messageAscii = 'xb\b\u001aab c' ;
4141
4242const server = tls . Server ( options , common . mustCall ( function ( socket ) {
43+ console . log ( 'server: on secureConnection' , socket . getProtocol ( ) ) ;
4344 socket . end ( messageUtf8 ) ;
4445} ) ) ;
4546
@@ -55,12 +56,18 @@ server.listen(0, function() {
5556 client . setEncoding ( 'ascii' ) ;
5657
5758 client . on ( 'data' , function ( d ) {
59+ console . log ( 'client: on data' , d ) ;
5860 assert . ok ( typeof d === 'string' ) ;
5961 buffer += d ;
6062 } ) ;
6163
64+ client . on ( 'secureConnect' , common . mustCall ( ( ) => {
65+ console . log ( 'client: on secureConnect' ) ;
66+ } ) ) ;
67+
68+ client . on ( 'close' , common . mustCall ( function ( ) {
69+ console . log ( 'client: on close' ) ;
6270
63- client . on ( 'close' , function ( ) {
6471 // readyState is deprecated but we want to make
6572 // sure this isn't triggering an assert in lib/net.js
6673 // See https://github.com/nodejs/node-v0.x-archive/issues/1069.
@@ -75,5 +82,5 @@ server.listen(0, function() {
7582 assert . strictEqual ( messageAscii , buffer ) ;
7683
7784 server . close ( ) ;
78- } ) ;
85+ } ) ) ;
7986} ) ;
0 commit comments