File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,7 @@ import RequestSuccess from "./packets/RequestSuccess.js"
5555export type ServerClientEvents = {
5656 error : ( error : Error ) => void
5757 close : ( ) => void
58+ connect : ( ) => void
5859 debug : ( ...message : any [ ] ) => void
5960 message : ( message : Buffer ) => void
6061 clientProtocolVersion : ( version : ProtocolVersionExchange ) => void
@@ -275,6 +276,8 @@ export default class ServerClient extends (EventEmitter as new () => TypedEventE
275276
276277 await this . handleAuthentication ( )
277278 // user is logged in!
279+ // emit the event
280+ this . emit ( "connect" )
278281
279282 // now that we have received USERAUTH_SUCCESS, we need
280283 // to handle GLOBAL_REQUEST.
@@ -419,6 +422,7 @@ export default class ServerClient extends (EventEmitter as new () => TypedEventE
419422 }
420423 const controller : ServerHookerPublicKeyAuthenticationController = {
421424 // both are independant since you can also allowLogin without checking the signature
425+ // would sucks tho !
422426 requestSignature : false ,
423427 allowLogin : false ,
424428 }
Original file line number Diff line number Diff line change @@ -14,8 +14,8 @@ const server = new Server({
1414} )
1515server . on ( "debug" , console . debug )
1616
17- server . listen ( 1023 , ( ) => {
18- server . debug ( "Server listening on port" , 1023 )
17+ server . listen ( 3022 , ( ) => {
18+ server . debug ( "Server listening on port" , 3022 )
1919} )
2020
2121server . on ( "connection" , ( client ) => {
You can’t perform that action at this time.
0 commit comments