Package twisted :: Package conch :: Package ssh :: Module connection :: Class SSHChannel

[show private | hide private]
[frames | no frames]

## Class SSHChannel

Known Subclasses:
  `SSHListenForwardingChannel`, `SSHConnectForwardingChannel`, `SSHSession`, `SSHSession`, `SSHSession`

Method Summary
| `__init__(self, localWindow, localMaxPacket, remoteWindow, remoteMaxPacket, conn)`
| ``addWindowBytes`(self, bytes)` Called when bytes are added to the remote window.
| ``channelOpen`(self, specificData)` Called when the channel is opened.
| ``closed`(self)` Called when the channel is closed.
| ``dataReceived`(self, data)` Called when we receive data.
| ``eofReceived`(self)` Called when the other side will send no more data.
| ``extReceived`(self, dataType, data)` Called when we receive extended data (usually standard error).
`tuple` | ``getHost`(self)` Return a tuple describing out side of the connection.
`tuple` | ``getPeer`(self)` Return a tuple describing the other side of the connection.
| ``loseConnection`(self)` Close the channel.
| ``openFailed`(self, reason)` Called when the the open failed for some reason.
`bool` | ``requestReceived`(self, requestType, data)` Called when a request is sent to this channel.
| ``write`(self, data)` Write some data to the channel.
| ``writeExtended`(self, dataType, data)` Send extended data to this channel.
| ``writeSequence`(self, data)` Part of the Transport interface.

Class Variable Summary
`None` | `name`

Method Details

### addWindowBytes(self, bytes)

Called when bytes are added to the remote window. By default it clears the data buffers.

  Parameters:
    `bytes`
    (type=`int`)

### channelOpen(self, specificData)

Called when the channel is opened. specificData is any data that the other side sent us when opening the channel.

  Parameters:
    `specificData`
    (type=`str`)

### closed(self)

Called when the channel is closed.

### dataReceived(self, data)

Called when we receive data.

  Parameters:
    `data`
    (type=`str`)

### eofReceived(self)

Called when the other side will send no more data.

### extReceived(self, dataType, data)

Called when we receive extended data (usually standard error).

  Parameters:
    `dataType`
    (type=`int`)
    `data`
    (type=`str`)

### getHost(self)

Return a tuple describing out side of the connection.

  Returns:
    `tuple`

### getPeer(self)

Return a tuple describing the other side of the connection.

  Returns:
    `tuple`

### loseConnection(self)

Close the channel.

### openFailed(self, reason)

Called when the the open failed for some reason. reason.desc is a string descrption, reason.code the the SSH error code.

  Parameters:
    `reason`
    (type=`error.ConchError`)

### requestReceived(self, requestType, data)

Called when a request is sent to this channel. By default it delegates to self.request_<requestType>. If this functio returns true, the request succeeded, otherwise it failed.

  Parameters:
    `requestType`
    (type=`str`)
    `data`
    (type=`str`)
  Returns:
    `bool`

### write(self, data)

Write some data to the channel. If there is not enough remote window available, buffer until it is.

  Parameters:
    `data`
    (type=`str`)

### writeExtended(self, dataType, data)

Send extended data to this channel. If there is not enough remote window available, buffer until there is.

  Parameters:
    `dataType`
    (type=`int`)
    `data`
    (type=`str`)

### writeSequence(self, data)

Part of the Transport interface. Write a list of strings to the channel.

  Parameters:
    `data`
    (type=`list` of `str`)

Class Variable Details

### name

  Type:
    `None`
  Value:

        None

Generated by Epydoc 1.1 on Sat Feb 15 21:18:55 2003 | http://epydoc.sf.net