Results 1 to 4 of 4

Thread: Using QtNetwork to allow my own chess program can make plays through LAN network

  1. #1
    Join Date
    Feb 2010
    Location
    Cuba
    Posts
    35
    Thanks
    6
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Using QtNetwork to allow my own chess program can make plays through LAN network

    Hi
    I'm developving a chess program using Qt, right now it's fully functional, two players can play in the same PC, but I want to allow 2 players to play in local network, and n observers using my program can watch it and all of then (the two players and others) can chat. I've been studing network examples in Qt Assistant, and I think the example that I can use is Network Chat (with some changes of course), but I'm new in Qt Network module and I need some help to carry out my desire. (this example is not fully documented)

    I only need to send two QPoints (x,y coordinates), oldPos and newPos for each move between the two players PCs and all the chat conversation, where every one can see all comments.

    thanks in advanced

    pd: sorry my English

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Using QtNetwork to allow my own chess program can make plays through LAN network

    But what exactly is the problem you are having?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Feb 2010
    Location
    Cuba
    Posts
    35
    Thanks
    6
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Using QtNetwork to allow my own chess program can make plays through LAN network

    First at all thanks wysota for your answer

    Well the problem right now is network-chat example are not fully documented and like I said I'm new using QtNetwork module and I'm new using networking operations.

    I need to make some changes to this example:

    all connections to the server must know and use the same port, because if there are more than one server game running, I' need to allow choose one of them.

    connected people can choose who they want to talk, or send all people connected a comment

    Only that I need is some help to understand how network-chat example's main classes works

    Thanks in advanced

    pd: sorry my English

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Using QtNetwork to allow my own chess program can make plays through LAN network

    I think you should start by designing a protocol you wish to implement. I'm sure there are lots of materials on that topic in the Internet. Only when you have the design ready start thinking how to implement it in Qt. Doing it the other way is not a good approach.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Replies: 10
    Last Post: 28th January 2011, 08:50
  2. Pending network replies won't let program to quit
    By novichkov in forum Qt Programming
    Replies: 0
    Last Post: 4th August 2010, 19:28
  3. Chess Program Drag and drop pieces
    By cwnelatury in forum Newbie
    Replies: 2
    Last Post: 29th April 2009, 22:43
  4. No error from QTNetwork if network goes off
    By Ganesh in forum Qt Programming
    Replies: 6
    Last Post: 27th November 2008, 21:29
  5. GET Network program
    By eleanor in forum Qt Programming
    Replies: 3
    Last Post: 30th October 2007, 08:22

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.