C++ Qt 69 - QTcpServer using QThreadPool

แชร์
ฝัง
  • เผยแพร่เมื่อ 13 ม.ค. 2025

ความคิดเห็น • 27

  • @VoidRealms
    @VoidRealms  13 ปีที่แล้ว

    @fuchofucho1 - that would be interesteing, not sure if Qt has built ion USB support

  • @VoidRealms
    @VoidRealms  13 ปีที่แล้ว

    @micro1337 hmmm not sure, perhaps I should try to tackle this in the up-coming UDP videos?

  • @thetoxic815
    @thetoxic815 11 ปีที่แล้ว

    The Mexican food joke ALMOST KILLED ME hahaha

  • @francescodelogu4847
    @francescodelogu4847 8 ปีที่แล้ว

    Many thanks, your tutorial are indeed Educationally Entertaining =)

  • @nancy-nm8vb
    @nancy-nm8vb 9 ปีที่แล้ว +2

    The incomingConnection is now
    QTcpServer::incomingConnection(qintptr handle)
    If you use the old int handle it will compile without problem but it will never be fired...

    • @vevero7139
      @vevero7139 9 ปีที่แล้ว

      Nancy Bellingan it is still not fired for me, why? If i do open 127.0.0.1 1234 it's saying "Could not open connection to the host, on port 1234: Connect failed". Why?

    • @nancy-nm8vb
      @nancy-nm8vb 9 ปีที่แล้ว

      did you check if the port is not used by another process?

    • @vevero7139
      @vevero7139 9 ปีที่แล้ว

      Nancy Bellingan yes, it's saying Server Started. This is my "myserver.cpp": pastebin.com/sw3xNEws

    • @nancy-nm8vb
      @nancy-nm8vb 9 ปีที่แล้ว

      if you are on linux please run as root:
      netstat -toolpen |grep :1234
      and see if another process is using this port.
      maybe you have already launched your program and not closed other instances.

    • @sigillumdei887
      @sigillumdei887 6 ปีที่แล้ว

      Check also if the port is blocked by the firewall for incomming connections...

  • @leethaksor
    @leethaksor 12 ปีที่แล้ว

    I was pleasantly surprised. I stumbled upon this by accident and expected it to be crap but it was very well done. I just have two minor issues with this. 1. Don't include stuff in the header unless you have to. Use forward declarations and do the includes in the source file. 2. When you override a function it should not be declared protected unless you intend to further derive from that class. Those functions are protected in the base class you're deriving from but they should be private here.

  • @Sintaxx2
    @Sintaxx2 11 ปีที่แล้ว +1

    You can't check if socket descriptor has been set or not by looking at its value! Integers don't have a default value, they could be anything.

  • @stijnbegeman306
    @stijnbegeman306 12 ปีที่แล้ว

    Thank you for this great tutorial!

  • @陈安邦-h9z
    @陈安邦-h9z 5 ปีที่แล้ว

    hello man,would you like to make a qt concurrent with tcpserver programmings

  • @TheWolverine1984
    @TheWolverine1984 6 ปีที่แล้ว

    Shouldn't you wait for client messages when you open the socket in the runnable instead of just closing it right away after a connection is made?
    I mean if you have a thread pool of 5 threads and actually wait for each client until they close the connection this becomes very simular to using QThreads... Except here you just limit the amout of sitmulatnius connecitons ...

  • @jaainaveen1727
    @jaainaveen1727 3 ปีที่แล้ว

    It's 2021 and you're helping me get a job thanks.... also... 69 Noice

  • @jaydabhi364
    @jaydabhi364 9 ปีที่แล้ว

    nice....I have one question....You are printing the messages on the debugging window..But if i want to print message on some display widgets like Textbrowser..What should i do????

  • @blaakel6102
    @blaakel6102 5 ปีที่แล้ว

    could we achieve the source files of the course specifically for TCP? Udemy?

  • @0xJuIian
    @0xJuIian 7 ปีที่แล้ว

    Still not able to call "incomingConnection(qintptr socketDescriptor)" and I don't know why. Telnet tells me Connectionproblem.... :( I'm using Qt 5 and changed int to qintptr .....

  • @inewlegend
    @inewlegend 13 ปีที่แล้ว

    ok and now how i can handle more packets?

    • @JohnSmithULIR0
      @JohnSmithULIR0 8 ปีที่แล้ว

      leonid vinikov well you handle them in your server readData constructor. That data received are just packets... So whatever you receive will be handled there..

  • @chunhuiwu4025
    @chunhuiwu4025 8 ปีที่แล้ว

    I dont know why my opening 127.0.0.1 always stopped on connectting to 127.0.0.1

    • @chunhuiwu4025
      @chunhuiwu4025 8 ปีที่แล้ว

      +Chunhui Wu I know,just argument in incomingConnection is qintptr now.

  • @tháinguyễn94
    @tháinguyễn94 9 ปีที่แล้ว

    I didn't see the multithread demonstration here