esp8266.py
def sendBuffer(self, protocol_str, host_str, port_int, buf):
    '''Make a TCP or UDP connection and send a buffer. Reuses an existing
    connection if possible. Disconnects from old host and reconnects to new host
    if necessary.'''
    self.sendCmd('AT+CIPMUX=0')
    currentStatus_str, currentProtocol_str, currentHost_str, currentPort_int = self.getCipStatus()
    print currentStatus_str, currentProtocol_str, currentHost_str, currentPort_int
    if currentProtocol_str != protocol_str or currentHost_str != host_str or currentPort_int != port_int:
      if currentStatus_str in ('GOTIP', 'CONNECTED'):
        self.closeCip()
      self.startCip(protocol_str, host_str, port_int)
    while buf:
      self._sendBuffer(buf[:MAX_CIPSEND_BUFFER_SIZE])
      buf = buf[MAX_CIPSEND_BUFFER_SIZE:]
Make a TCP or UDP connection and send a buffer. Reuses an existing
    connection if possible. Disconnects from old host and reconnects to new host
    if necessary.
Make a TCP or UDP connection and send a buffer. Reuses an existing
connection if possible. Disconnects from old host and reconnects to new host
if necessary.
Make a TCP or UDP connection and send a buffer . Reuses an existing connection if possible . Disconnects from old host and reconnects to new host if necessary .
def sendBuffer(self, protocol_str, host_str, port_int, buf):
    self.sendCmd('AT+CIPMUX=0')
    currentStatus_str, currentProtocol_str, currentHost_str, currentPort_int = self.getCipStatus()
    print currentStatus_str, currentProtocol_str, currentHost_str, currentPort_int
    if currentProtocol_str != protocol_str or currentHost_str != host_str or currentPort_int != port_int:
      if currentStatus_str in ('GOTIP', 'CONNECTED'):
        self.closeCip()
      self.startCip(protocol_str, host_str, port_int)
    while buf:
      self._sendBuffer(buf[:MAX_CIPSEND_BUFFER_SIZE])
      buf = buf[MAX_CIPSEND_BUFFER_SIZE:]
def sendBuffer ( self , protocol_str , host_str , port_int , buf ) : self . sendCmd ( 'AT+CIPMUX=0' ) currentStatus_str , currentProtocol_str , currentHost_str , currentPort_int = self . getCipStatus ( ) print currentStatus_str , currentProtocol_str , currentHost_str , currentPort_int if currentProtocol_str != protocol_str or currentHost_str != host_str or currentPort_int != port_int : if currentStatus_str in ( 'GOTIP' , 'CONNECTED' ) : self . closeCip ( ) self . startCip ( protocol_str , host_str , port_int ) while buf : self . _sendBuffer ( buf [ : MAX_CIPSEND_BUFFER_SIZE ] ) buf = buf [ MAX_CIPSEND_BUFFER_SIZE : ]
Make a TCP or UDP connection and send a buffer.
Make a TCP or UDP connection and send a buffer .
'''Make a TCP or UDP connection and send a buffer. Reuses an existing
    connection if possible. Disconnects from old host and reconnects to new host
    if necessary.'''
self
protocol_str
host_str
port_int
buf