--- a/src/eric7/Cooperation/Connection.py Tue Dec 19 11:04:03 2023 +0100 +++ b/src/eric7/Cooperation/Connection.py Tue Dec 19 19:57:08 2023 +0100 @@ -71,7 +71,8 @@ """ Constructor - @param parent referenec to the parent object (QObject) + @param parent referenec to the parent object + @type QObject """ super().__init__(parent) @@ -98,7 +99,8 @@ """ Public method to get the connection name. - @return connection name (string) + @return connection name + @rtype str """ return self.__username @@ -106,7 +108,8 @@ """ Public method to get the server port. - @return server port (integer) + @return server port + @rtype int """ return self.__serverPort @@ -114,7 +117,8 @@ """ Public method to set the reference to the cooperation client. - @param client reference to the cooperation client (CooperationClient) + @param client reference to the cooperation client + @type CooperationClient """ self.__client = client @@ -122,8 +126,10 @@ """ Public method to set the greeting message. - @param message greeting message (string) - @param serverPort port number to include in the message (integer) + @param message greeting message + @type str + @param serverPort port number to include in the message + @type int """ self.__greetingMessage = "{0}:{1}".format(message, serverPort) @@ -131,8 +137,10 @@ """ Public method to send a message. - @param message message to be sent (string) - @return flag indicating a successful send (boolean) + @param message message to be sent + @type str + @return flag indicating a successful send + @rtype bool """ if message == "": return False @@ -152,7 +160,8 @@ """ Protected method to handle timer events. - @param evt reference to the timer event (QTimerEvent) + @param evt reference to the timer event + @type QTimerEvent """ if evt.timerId() == self.__transferTimerId: self.abort() @@ -292,8 +301,10 @@ """ Private method to read some data into the buffer. - @param maxSize maximum size of data to read (integer) - @return size of data read (integer) + @param maxSize maximum size of data to read + @type int + @return size of data read + @rtype int """ if maxSize > MaxBufferSize: return 0 @@ -314,7 +325,8 @@ """ Private method to get the data length for the current data type. - @return data length (integer) + @return data length + @rtype int """ if ( self.bytesAvailable() <= 0 @@ -332,7 +344,8 @@ """ Private method to read the protocol header. - @return flag indicating a successful read (boolean) + @return flag indicating a successful read + @rtype bool """ if self.__transferTimerId: self.killTimer(self.__transferTimerId) @@ -371,7 +384,8 @@ """ Private method to check, if enough data is available. - @return flag indicating availability of enough data (boolean) + @return flag indicating availability of enough data + @rtype bool """ if self.__transferTimerId: self.killTimer(self.__transferTimerId) @@ -445,8 +459,8 @@ """ Public method to send the list of participants. - @param participants list of participants (list of strings of - "host:port") + @param participants list of participants (list of "host:port" strings) + @type list of str """ message = SeparatorToken.join(participants) if participants else "<empty>" msg = QByteArray(message.encode("utf-8")) @@ -464,10 +478,13 @@ """ Public method to send an editor command. - @param projectHash hash of the project (string) + @param projectHash hash of the project + @type str @param filename project relative universal file name of - the sending editor (string) - @param message editor command to be sent (string) + the sending editor + @type str + @param message editor command to be sent + @type str """ msg = QByteArray( "{0}{1}{2}{1}{3}".format(