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
SendData method
Sends array of bytes to the user.
Type
NoneSyntax
- Basic
object.SendData Data, [ServiceIndex]
The SendData(object,Data,ServiceIndex) syntax has these parts:
The SendData(object,Data,ServiceIndex) syntax has these parts:
object | An expression evaluating to an object of type SSHUser. |
Data | Required. A Variant value. Byte array that holds data that should be sent to the user. |
ServiceIndex | Optional. A Variant value. Index of the service you're sending data to. |
Remarks
Unlike Sendmethod that sends string expression to the client, sometimes there's a need to send raw bytes to the client, as a part of some protocol you're implementing or similar. Since String variables are unhappy when holding raw binary data (although you can put binary data in String variables also), you should use this method for sending such data.Following example sends 'WELCOME!' message to the client. Using
User.Send "WELCOME!" & VbCrLf
you would achieve the same result (sample in VB)
Private Sub wodSSHD1_ServiceStart(ByVal User As wodSSHDComLIB.ISSHUser, ByVal ServiceIndex As Long, ByVal ServiceType As wodSSHDComLIB.SSHServiceTypes, ByVal ServiceName As String)
Dim a(10) As Byte
a(1) = Asc("W")
a(2) = Asc("E")
a(3) = Asc("L")
a(4) = Asc("C")
a(5) = Asc("O")
a(6) = Asc("M")
a(7) = Asc("E")
a(8) = Asc("!")
a(9) = 13
a(10) = 10
User.SendData a
End Sub