(self, s)
Send a pickled string to the socket.

        This function allows for partial sends which can happen when the
        network is busy.
Send a pickled string to the socket.
Send a pickled string to the socket .
def send(self, s):
        """
        Send a pickled string to the socket.

        This function allows for partial sends which can happen when the
        network is busy.
        """
        if self.sock is None:
            self.createSocket()
        #self.sock can be None either because we haven't reached the retry
        #time yet, or because we have reached the retry time and retried,
        #but are still unable to connect.
        if self.sock:
            try:
                self.sock.sendall(s)
            except OSError: #pragma: no cover
                self.sock.close()
                self.sock = None
def send ( self , s ) : if self . sock is None : self . createSocket ( ) #self.sock can be None either because we haven't reached the retry #time yet, or because we have reached the retry time and retried, #but are still unable to connect. if self . sock : try : self . sock . sendall ( s ) except OSError : #pragma: no cover self . sock . close ( ) self . sock = None