none
Private chat using wcf RRS feed

  • Question

  • hi,
    I have developed a chat application using wcf with nettcp binding.It has private chat which allows any 2 nodes to chat or whisper privately through a different new window.Iam using DuplexChanelFactory to create channels.
    When i click on Private chat an instance of the current form appears ie child form on both sides.Now these 2 nodes should be able to chat privately thru child window that opened up.
    The problem is  that every message i type is executed twice on child window.This is because i create a new channel to communicate between child forms and the parent channel is already open to listen from some other node.Not able to use the first channel created and it shows null.What should i do now????


    I need to reach to my destination n being very near to it,I just want a slight help or response from members.I have referred every possible links on these topics.Ill post the code if ne1 wants to watch it clearly to help me out..


    Plz do reply.Waiting for the response eagerly.......

    Thanks in advance
    Mumtaz

    Mumtaz Surani
    Friday, November 6, 2009 7:58 AM

Answers

  • Hi Mumtaz,

    Please give more information about  your chat application. Let us know its structure. How do you set up network connection between two nodes?

    I recommend that you use Duplex pattern to let Service notify that one client listens on one specific port and the other client starts to connect to that endpoint for communication via the Socket class. You can use this method to detect client IP in service operation:
    http://nayyeri.net/detect-client-ip-in-wcf-3-5

    Best regards,
    Riquel
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Thursday, November 12, 2009 8:31 AM
    Moderator