[PyQt] network-chat sample

Philippe Crave philippe.crave at gmail.com
Sun Jun 6 06:58:27 BST 2010


you broadcast, but on one single port 7755.
If I have one application on each PC, it works.
but I will have several applications on each PC. then, each
application server should listen a different port, thus, for
communication, each application will have to write the socket to a
list of adress/port

am i wrong ?

2010/6/6 Gustavo A. Díaz <gustavo.diaz at gmail.com>:
> Hi,
>
> I don't know if this will help a little, but here is how i do a broadcast to
> find workstations on my net:
>
> http://opencoffee.lnxteam.org/trac/browser/trunk/opencoffee-server/core/workstations/workstations.py#L1469
> (server side)
> http://opencoffee.lnxteam.org/trac/browser/trunk/opencoffee-client/core/network/network.py#L232
> (client side)
>
> Cheers.
>
> 2010/6/5 Philippe Crave <philippe.crave at gmail.com>
>>
>> thanks, I will check that.
>>
>> What I am looking for, is a way to get several applications (made with
>> pyqt) exchanging data. they will be on different PCs, on a local
>> network.
>> and there will be 2 or 3 applications on each PC.
>>
>> I would like that each application send its data, when ready, to all
>> the others (other application on the same PC, and other applications
>> on the other PCs).
>>
>> so far, the best I could find is that each application should send a
>> socket to all the others, one by one.
>> I did not find a way to broadcast. If someone know how to do it, that will
>> help.
>> and then, each application runs a threaded QTcpServer.
>>
>> then, I am looking for a way for the applications to find the others
>> on the network (ie, find the adress/port)
>> that's why I try to understand the chat sample.
>>
>>
>> 2010/6/5 Gustavo A. Díaz <gustavo.diaz at gmail.com>:
>> > Ehmmm... now that I see better is another example, but maybe you could
>> > have
>> > some code as example.
>> >
>> > 2010/6/5 Gustavo A. Díaz <gustavo.diaz at gmail.com>
>> >>
>> >> I used it for my application with some improvements. Read it in these
>> >> classes:
>> >>
>> >>
>> >>
>> >> http://opencoffee.lnxteam.org/trac/browser/trunk/opencoffee-server/core/workstations/workstations.py#L503
>> >>
>> >>
>> >> http://opencoffee.lnxteam.org/trac/browser/trunk/opencoffee-client/core/chat/chatClient.py
>> >>
>> >> Cheers.
>> >>
>> >>
>> >> 2010/6/5 Philippe Crave <philippe.crave at gmail.com>
>> >>>
>> >>> Hello,
>> >>>
>> >>> is there somewhere the network-chat example in python ?
>> >>> http://doc.qt.nokia.com/4.6/network-network-chat.html
>> >>>
>> >>> thank you,
>> >>>
>> >>> philippe
>> >>> _______________________________________________
>> >>> PyQt mailing list    PyQt at riverbankcomputing.com
>> >>> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>> >>
>> >>
>> >>
>> >> --
>> >> Gustavo A. Díaz
>> >> GDNet Projects
>> >> www.gdnet.com.ar
>> >
>> >
>> >
>> > --
>> > Gustavo A. Díaz
>> > GDNet Projects
>> > www.gdnet.com.ar
>> >
>> > _______________________________________________
>> > PyQt mailing list    PyQt at riverbankcomputing.com
>> > http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>> >
>> _______________________________________________
>> PyQt mailing list    PyQt at riverbankcomputing.com
>> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>
>
> --
> Gustavo A. Díaz
> GDNet Projects
> www.gdnet.com.ar
>
> _______________________________________________
> PyQt mailing list    PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>


More information about the PyQt mailing list