wodSSHServer ActiveX Control - Received Method
      
 

Description

Called when there's data received from the user.


Return Type

None  


Syntax

object.Received Owner, User, ServiceIndex, BytesCount



The Received Method syntax has these parts:

Part Description
object An expression evaluating to an object of type wodSSHD-Notifications.
Owner A wodSSHDCom object. Instance of wodSSHServer that called this notification method.
User A SSHUser object. Reference to user who received the data.
ServiceIndex An Integer value. Service index number (0 for main service).
BytesCount An Integer value. Total number of bytes waiting to be received.

Remarks

This method is called only if you implemented IwodSSHNotify interface in your application, and wodSSHD.Notification property has received reference to instance of your implementation.

This notification method is called when wodSSHD has received some data by the client, which should by visible to the application. You will receive this notification method only if you set ServiceType for the service referred by ServiceIndex to stNone. stNone means that you will deal with receiving/sending data by yourself, unlike other service types where wodSSHD deals with the received and sent data.

If user is using more than one service at the same time (opened more than one channel in SSH words) then ServiceIndex will hold information about particular service that is used. You should NEVER send data to the wrong service because unexpected results may occur. When you receive data for some service, for example one with index 0, then send data also to service 0.

BytesCount argument holds total number of bytes waiting to be read using Receive or ReceiveData methods. If those methods don't read all of available data, wodSSHD will call this notification method once again (and again and again....) immediately until you consume all data. This is made so that wodSSHD doesn't buffer too much data and don't produce memory problems. Leaving Received notification method with no body can lead to unlimited loop between wodSSHD and your software, so please put some code there.