Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. client/server periodic data transfer

client/server periodic data transfer

Scheduled Pinned Locked Moved C#
sysadminhelpquestionannouncement
10 Posts 6 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    teknolog123
    wrote on last edited by
    #1

    hi everyone, I'm able to transfer string data from server to client. But my recent code runs,transfers the string and stops. My problem is that I want to update that string every minute. I can make server send the updated data every minute but how can the client keep listening?, thanks in advance.

    L L L M 4 Replies Last reply
    0
    • T teknolog123

      hi everyone, I'm able to transfer string data from server to client. But my recent code runs,transfers the string and stops. My problem is that I want to update that string every minute. I can make server send the updated data every minute but how can the client keep listening?, thanks in advance.

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      teknolog123 wrote:

      how can the client keep listening?

      Just use some form of timed loop, or wait on a receive call for the server to send some data.

      It's time for a new signature.

      1 Reply Last reply
      0
      • T teknolog123

        hi everyone, I'm able to transfer string data from server to client. But my recent code runs,transfers the string and stops. My problem is that I want to update that string every minute. I can make server send the updated data every minute but how can the client keep listening?, thanks in advance.

        L Offline
        L Offline
        Luc Pattyn
        wrote on last edited by
        #3

        A server should reply a client's request, no more, no less. It should not try and keep a list of clients, and it should not take any initiative in communications. If you want periodic communication between one or more clients and a server, make the clients request new data periodically. :)

        Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum

        Please use < PRE > tags for code snippets, it preserves indentation, and improves readability.

        T P 2 Replies Last reply
        0
        • T teknolog123

          hi everyone, I'm able to transfer string data from server to client. But my recent code runs,transfers the string and stops. My problem is that I want to update that string every minute. I can make server send the updated data every minute but how can the client keep listening?, thanks in advance.

          L Offline
          L Offline
          Laxman Auti
          wrote on last edited by
          #4

          teknolog123 wrote:

          My problem is that I want to update that string every minute. I can make server send the updated data every minute but how can the client keep listening?

          I think your client/server module is working reversely. Instead of server sending data to client every minute, let client do the request to server for the data and let server keep listening for the client requests. I think that makes sense, right?

          Knock out 't' from can't, you can if you think you can. :cool:

          T 1 Reply Last reply
          0
          • L Luc Pattyn

            A server should reply a client's request, no more, no less. It should not try and keep a list of clients, and it should not take any initiative in communications. If you want periodic communication between one or more clients and a server, make the clients request new data periodically. :)

            Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum

            Please use < PRE > tags for code snippets, it preserves indentation, and improves readability.

            T Offline
            T Offline
            teknolog123
            wrote on last edited by
            #5

            thanks Luc!

            L 1 Reply Last reply
            0
            • L Laxman Auti

              teknolog123 wrote:

              My problem is that I want to update that string every minute. I can make server send the updated data every minute but how can the client keep listening?

              I think your client/server module is working reversely. Instead of server sending data to client every minute, let client do the request to server for the data and let server keep listening for the client requests. I think that makes sense, right?

              Knock out 't' from can't, you can if you think you can. :cool:

              T Offline
              T Offline
              teknolog123
              wrote on last edited by
              #6

              Yes you're right! Thanks, I'll do so

              L 1 Reply Last reply
              0
              • T teknolog123

                thanks Luc!

                L Offline
                L Offline
                Luc Pattyn
                wrote on last edited by
                #7

                you're welcome. :)

                Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum

                Please use < PRE > tags for code snippets, it preserves indentation, and improves readability.

                1 Reply Last reply
                0
                • L Luc Pattyn

                  A server should reply a client's request, no more, no less. It should not try and keep a list of clients, and it should not take any initiative in communications. If you want periodic communication between one or more clients and a server, make the clients request new data periodically. :)

                  Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum

                  Please use < PRE > tags for code snippets, it preserves indentation, and improves readability.

                  P Offline
                  P Offline
                  PIEBALDconsult
                  wrote on last edited by
                  #8

                  50!

                  1 Reply Last reply
                  0
                  • T teknolog123

                    Yes you're right! Thanks, I'll do so

                    L Offline
                    L Offline
                    Laxman Auti
                    wrote on last edited by
                    #9

                    You are welcome. :)

                    Knock out 't' from can't, you can if you think you can. :cool:

                    1 Reply Last reply
                    0
                    • T teknolog123

                      hi everyone, I'm able to transfer string data from server to client. But my recent code runs,transfers the string and stops. My problem is that I want to update that string every minute. I can make server send the updated data every minute but how can the client keep listening?, thanks in advance.

                      M Offline
                      M Offline
                      Mirko1980
                      wrote on last edited by
                      #10

                      It looks like you may use a Duplex channel.

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups