<commit_before>#ifndef PEERCONNECTION_H
#define PEERCONNECTION_H

#include <QObject>
#include <QtNetwork>
#include <QThread>
#include "common.h"
#include "messages.h"
#include "serverconnection.h"

//class ServerConnection; //we are going to use our certificate from here


/**
 * @brief The PeerConnection class                      This class is managing (established) connection with another peer. Can be initiated by this peer (directly creating the socket)
 *                                                      or by remote peer (via server) All data construction/parsing for communication is made outside the class...
 */
class PeerConnection : public QObject
{
    Q_OBJECT
public:
    explicit PeerConnection(qintptr soc = 0, peer _peer = {}, ServerConnection *server = nullptr, QObject *parent = 0);

    void sendData(QByteArray d);

    //getters
    int getID() {return mID;}
    peer getPeer() {return mPeer;}
    QTcpSocket *getSocket() {return mSoc;}
    bool isEstablished() {return mEstablished;}
    int getPeerPort() {return mPeerPort;}
    QString getPeerAddress() {return mPeerAddress;}
    //setters
    void setID(int id) {mID = id;}<commit_msg>Removed unnecessary method<commit_after>#ifndef PEERCONNECTION_H
#define PEERCONNECTION_H

#include <QObject>
#include <QtNetwork>
#include <QThread>
#include "common.h"
#include "messages.h"
#include "serverconnection.h"

//class ServerConnection; //we are going to use our certificate from here


/**
 * @brief The PeerConnection class                      This class is managing (established) connection with another peer. Can be initiated by this peer (directly creating the socket)
 *                                                      or by remote peer (via server) All data construction/parsing for communication is made outside the class...
 */
class PeerConnection : public QObject
{
    Q_OBJECT
public:
    explicit PeerConnection(qintptr soc = 0, peer _peer = {}, ServerConnection *server = nullptr, QObject *parent = 0);

    //getters
    int getID() {return mID;}
    peer getPeer() {return mPeer;}
    QTcpSocket *getSocket() {return mSoc;}
    bool isEstablished() {return mEstablished;}
    int getPeerPort() {return mPeerPort;}
    QString getPeerAddress() {return mPeerAddress;}
    //setters
    void setID(int id) {mID = id;}
{'fraction_non_alphanumeric': 0.0944372574385511, 'fraction_numerical': 0.0017248814144027599, 'mean_word_length': 3.210526315789474, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '92120', 'n_tokens_mistral': 648, 'n_tokens_neox': 626, 'n_words': 234}