Back to product page
- Introduction
- Overview
- License agreement
- Getting Started
- Objects
- Enumerations
- wodSSHD
- Methods
- Properties
- Events
- Connecting
- CryptoInformation
- Disconnected
- LoginGSSAPI
- LoginPassword
- LoginPubkey
- PortBindRequest
- PortForwardConnect
- PortForwardDisconnect
- PortForwardRequest
- Received
- ServiceRequest
- ServiceStart
- SftpDeleteFile
- SftpDownloadFile
- SftpFileTransferData
- SftpListDir
- SftpListDirData
- SftpMakeDir
- SftpProgress
- SftpRemoveDir
- SftpRename
- SftpTransferComplete
- SftpUploadFile
- StateChanged
- IwodSSHDNotify
- Methods
- Connecting
- CryptoInformation
- Disconnected
- LoginGSSAPI
- LoginPassword
- LoginPubkey
- PortBindRequest
- PortForwardConnect
- PortForwardDisconnect
- PortForwardRequest
- Received
- ServiceRequest
- ServiceStart
- SftpDeleteFile
- SftpDownloadFile
- SftpFileTransferData
- SftpListDir
- SftpListDirData
- SftpMakeDir
- SftpProgress
- SftpRemoveDir
- SftpRename
- SftpTransferComplete
- SftpUploadFile
- StateChanged
- Methods
- SSHKeyPair
- SSHUser
- SSHUsers
- How to get support
- Technical information
- Fast notifications
- Error list
Notification property
Fast notification interface to use instead of events.
Syntax
- Basic
[Set] object.Notification [= IwodSSHDNotify]
The Notification(object,IwodSSHDNotify) syntax has these parts:
The Notification(object,IwodSSHDNotify) syntax has these parts:
object | An expression evaluating to an object of type wodSSHDCom. |
IwodSSHDNotify | An IwodSSHDNotify object. |
Remarks
This method exists only in COM version of wodSSHServer.Notification property holds reference to IwodSSHDNotify interface that can be implemented by your application. When this property is set, and contains such a reference, wodSSHD will call your method implementations instead of firing events. More information on how this works can be found here.
For example, instead of having this in your code (VB example):
Private Sub wodSSHD1_LoginPassword(ByVal User As wodSSHDComLIB.ISSHUser, ByVal Login As String, ByVal Password As String, Action As wodSSHDComLIB.SSHActions)
' allow everyone to come in and show that big message
If Login <> "" Then Action = Allow
End Sub
you will have this:
Private Sub IwodSSHD-Notifications_LoginPassword(ByVal Owner As wodSSHDComLIB.IwodSSHDCom, ByVal User As wodSSHDComLIB.ISSHUser, ByVal Login As String, ByVal Password As String, Action As wodSSHDComLIB.SSHActions)
' allow everyone to come in and show that big message
If Login <> "" Then Action = Allow
End Sub
pretty much the same - except notification method has one more argument - Owner, which holds reference to wodSSHD instance that called this method. In VB, to implement IwodSSHD-Notifications interface, you need code like this: - at the top of the code, in
Dim Sshd As wodSSHDCom
Implements IwodSSHD-Notifications
- in Form_Load (or where you initialize new instance of wodSSH) do this:
Set Sshd = New wodSSHDCom
Set Sshd.Notification = Me
Sshd.Start
...
You can notice that when we declared Ssh, we did not use WithEvents keyword - it is not needed anymore, because events will not be fired anymore. Notification methods we implement will be called instead!