Beispiel #1
0
 def write(self, bytes):
     """
     Write some bytes to this connection, passing them through a TLS layer if
     necessary, or discarding them if the connection has already been lost.
     """
     if self.TLS:
         if self.connected:
             self.protocol.write(bytes)
     else:
         FileDescriptor.write(self, bytes)
 def write(self, bytes):
     """
     Write some bytes to this connection, passing them through a TLS layer if
     necessary, or discarding them if the connection has already been lost.
     """
     if self.TLS:
         if self.connected:
             self.protocol.write(bytes)
     else:
         FileDescriptor.write(self, bytes)
Beispiel #3
0
 def write(self, bytes):
     """
     Write some bytes to this connection, passing them through a TLS layer if
     necessary, or discarding them if the connection has already been lost.
     """
     if self.TLS:
         if self.connected:
             self.protocol.write(bytes)
     elif self._tlsWaiting is not None:
         self._tlsWaiting.bufferedData.append(bytes)
     else:
         FileDescriptor.write(self, bytes)
Beispiel #4
0
 def write(self, bytes):
     """
     Write some bytes to this connection, passing them through a TLS layer if
     necessary, or discarding them if the connection has already been lost.
     """
     if self.TLS:
         if self.connected:
             self.protocol.write(bytes)
     elif self._tlsWaiting is not None:
         self._tlsWaiting.bufferedData.append(bytes)
     else:
         FileDescriptor.write(self, bytes)
Beispiel #5
0
 def write(self, bytes):
     if self._tlsWaiting is not None:
         self._tlsWaiting.bufferedData.append(bytes)
     else:
         FileDescriptor.write(self, bytes)
Beispiel #6
0
 def write(self, bytes):
     if self._tlsWaiting is not None:
         self._tlsWaiting.bufferedData.append(bytes)
     else:
         FileDescriptor.write(self, bytes)
Beispiel #7
0
 def write(self, data):
     if self.reading:
         self.backToReading = True
     self.stopReading()
     FileDescriptor.write(self, data)
Beispiel #8
0
 def write(self, data):
     if self.reading:
         self.backToReading = True
     self.stopReading()
     FileDescriptor.write(self, data)