About Receiving Message continuously from another application

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pvenkatesh2k4
    New Member
    • Feb 2008
    • 18

    About Receiving Message continuously from another application

    hi to all,
    i am new to .net development. i have daveloped an application which is to receive continuosly from another using socket programming.i have used the following statement


    while(true)
    {

    -----
    client.receive( data);
    -------parsing code
    }


    actually this code prevent me from using other controls in the form. but i need to access other controls.is any other way to identify the arrival of data in the remote host.
    please help me to learn.
    thanks a lot to transfering ur knowledge
  • Plater
    Recognized Expert Expert
    • Apr 2007
    • 7872

    #2
    You will probably need to run that socket code in a seperate thread

    Comment

    • pvenkatesh2k4
      New Member
      • Feb 2008
      • 18

      #3
      Originally posted by Plater
      You will probably need to run that socket code in a seperate thread
      thanks for your reply.and also i have found new problem with my receive method.Message( Alerts,Updates about a device) will arise from different clients. but my receive method receives all the message as a whole.but i need message by message.is there any mechanism to read message by message?

      Comment

      • Plater
        Recognized Expert Expert
        • Apr 2007
        • 7872

        #4
        Stick a delimenator in your messages or give your messages a header that says how big they will be?

        Comment

        Working...