Receiving data

Top  Previous  Next

Once a connection has been established and authentication is complete you will begin to receive data from the SSH server. All data received from the SSH server is handled using the SshDataReceivedEvent event. To capture the SshDataReceivedEvent you will need to implement the SshListener class, register your class as a listener for SSH related events and overload the SshListener#dataReceived method.  See Listening for events for more information on capturing SSH related events.

 

Example

 

/**

* Captures SshDataReceivedEvent

*/

public void dataReceived(SshDataReceivedEvent ev) {

// send data received to console

 System.out.print(ev.getData());

}





Home | Company | Products | Solutions | Purchase | Support | Services | Blog

© 2021 JSCAPE LLC