Git Product home page Git Product logo

qtcpsocket's Introduction

QTcpSocket

A simple Qt client-server TCP architecture to transfer data between peers.

Application

The Architecture is made up of 2 projects:

  • QTCPServer
  • QTCPClient

You can instantiate as many QTCPClient as you wish.

Features

  1. Broadcast transferring
  2. Single channel transferring
  3. Media transferring capabilities (*.json, *.txt, *.png, *.jpg, *.jpeg)
  4. Updated to latest slot-signal syntax found in Qt 5.15
  5. Non-redundant design

Protocol

The protocol i've designed to enable data transferring is pretty straightforward, each message sent is made up of:

  • A 128 byte fixed-size header
  • A Non-fixed size data buffer

Protocol schema

The header follows the following structure:

QString header = QString("fileType:%1, fileName:%2, fileSize:%3;")

Where:

  • %1 can be "attachment" or "message";
  • %2 is "null" for messages, the correspondent fileName for attachments sent;
  • %3 is the size of the message or the attachment sent.

Many improvements could have been made during protocol design, one among many, to specify header size in the header and save up some byte during transfers, especially messages ones.

This protocol is meant to be used only for recreative purposes as it isn't compliant at all to the FTP quality standards, that we are used to, nowadays.

qtcpsocket's People

Contributors

manfredipist avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.