Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QThread and QTcpSocket problem
Qt 6.11 is out! See what's new in the release blog

QThread and QTcpSocket problem

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 831 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Y Offline
    Y Offline
    youyouli1986
    wrote on last edited by
    #1

    Sorry for my bad english!

    Assume i have thread A and thread B, thread A interactive with server C through QTcpSocket, thread B interactive with server D through QTcpSocket. thread A and thread B all do work in infinite loop. thread A receive command from server C, then A tell B to suspend loop and do another work(send and receive message from D), when work finished, B resume previous work. How can i achieve this?

    1 Reply Last reply
    0
    • Q Offline
      Q Offline
      qxoz
      wrote on last edited by
      #2

      Hi. Your question is too general. First of all take a look to examples:
      "Network Examples":https://qt-project.org/doc/qt-5/examples-network.html
      "Threading and Concurrent Programming Examples":https://qt-project.org/doc/qt-5/examples-threadandconcurrent.html
      "Inter-Process Communication (IPC) Examples":https://qt-project.org/doc/qt-5/examples-ipc.html

      Other examples and tutorials you can find "here":https://qt-project.org/doc/qt-5/qtexamplesandtutorials.html

      Also take a look to video tutorials from "voidrealms":http://voidrealms.com/
      I hope it helps you to start.

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved