Send an echo command containing *data* to the remote SMB/CIFS server. The remote SMB/CIFS will reply with the same *data*. :param bytes data: Data to send to the remote server. Must be a bytes object. :param integer/float timeout: Number of seconds that pysmb will wait befo
(self, data, timeout = 10)
| 376 | return d |
| 377 | |
| 378 | def echo(self, data, timeout = 10): |
| 379 | """ |
| 380 | Send an echo command containing *data* to the remote SMB/CIFS server. The remote SMB/CIFS will reply with the same *data*. |
| 381 | |
| 382 | :param bytes data: Data to send to the remote server. Must be a bytes object. |
| 383 | :param integer/float timeout: Number of seconds that pysmb will wait before raising *SMBTimeout* via the returned *Deferred* instance's *errback* method. |
| 384 | :return: A *twisted.internet.defer.Deferred* instance. The callback function will be called with the *data* parameter. |
| 385 | """ |
| 386 | if not self.instance: |
| 387 | raise NotConnectedError('Not connected to server') |
| 388 | |
| 389 | d = defer.Deferred() |
| 390 | self.instance._echo(data, d.callback, d.errback, timeout) |
| 391 | return d |
| 392 | |
| 393 | def closeConnection(self): |
| 394 | """ |
nothing calls this directly
no test coverage detected