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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. having trouble making messenger

having trouble making messenger

Scheduled Pinned Locked Moved C#
sysadmin
12 Posts 5 Posters 0 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.
  • S sikandarhayat

    hello i want to make a netwrok messenger which consists one server and multi client i tried to make with tcp and udp. please tell me which will be best for it. if any one have the code please send it to me. server which contain only listining side and maintain the user data base. if the user(client is registered) can connected and it can registered it self. client should be able to send and recieve meseges that client it have added (like msn) if you can provide me the code, i will be pleased thank u. :sigh: sikandar

    H Offline
    H Offline
    HakunaMatada
    wrote on last edited by
    #2

    Protocol wise, I think UDP is better for Messengers as they are fast. For the source look up the Internet and Networking section of our own codeProject. You will definately find a lot of examples there. :) Cheers... --- With best regards, A Manchester United Fan The Genius of a true fool is that he can mess up a foolproof plan!

    L D 2 Replies Last reply
    0
    • H HakunaMatada

      Protocol wise, I think UDP is better for Messengers as they are fast. For the source look up the Internet and Networking section of our own codeProject. You will definately find a lot of examples there. :) Cheers... --- With best regards, A Manchester United Fan The Genius of a true fool is that he can mess up a foolproof plan!

      L Offline
      L Offline
      leppie
      wrote on last edited by
      #3

      Save My Soul - (SMS) wrote:

      Protocol wise, I think UDP is better for Messengers as they are fast.

      You really want users coming to you screaming where their messages went? No, just use TCP. xacc.ide-0.1.1 released! :) Download and screenshots

      H 1 Reply Last reply
      0
      • L leppie

        Save My Soul - (SMS) wrote:

        Protocol wise, I think UDP is better for Messengers as they are fast.

        You really want users coming to you screaming where their messages went? No, just use TCP. xacc.ide-0.1.1 released! :) Download and screenshots

        H Offline
        H Offline
        HakunaMatada
        wrote on last edited by
        #4

        I believe that most of the messengers use UDP for communication! Or am I wrong? :confused: But still, yes, UDP is unreliable whereas TCP is. So I guess its a choice between speed and reliability.. :) --- With best regards, A Manchester United Fan The Genius of a true fool is that he can mess up a foolproof plan!

        1 Reply Last reply
        0
        • H HakunaMatada

          Protocol wise, I think UDP is better for Messengers as they are fast. For the source look up the Internet and Networking section of our own codeProject. You will definately find a lot of examples there. :) Cheers... --- With best regards, A Manchester United Fan The Genius of a true fool is that he can mess up a foolproof plan!

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #5

          Save My Soul - (SMS) wrote:

          Protocol wise, I think UDP is better for Messengers as they are fast.

          :wtf: It's a chat application! Who cares about the .0005 seconds faster the 1 or 2 message packets would take get there! In a chat app, reliablility is better than the negligable "speed" gain you get. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

          K H 2 Replies Last reply
          0
          • D Dave Kreskowiak

            Save My Soul - (SMS) wrote:

            Protocol wise, I think UDP is better for Messengers as they are fast.

            :wtf: It's a chat application! Who cares about the .0005 seconds faster the 1 or 2 message packets would take get there! In a chat app, reliablility is better than the negligable "speed" gain you get. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

            K Offline
            K Offline
            kourvoisier
            wrote on last edited by
            #6

            Is your app communicating over the web or just a lan. If communicating over the web you may want to read up on SOAP web services.... i myself have been working on a messenger app i have gotten pretty far but not a client/server app each node is sort of a client and server itself.

            H D 2 Replies Last reply
            0
            • D Dave Kreskowiak

              Save My Soul - (SMS) wrote:

              Protocol wise, I think UDP is better for Messengers as they are fast.

              :wtf: It's a chat application! Who cares about the .0005 seconds faster the 1 or 2 message packets would take get there! In a chat app, reliablility is better than the negligable "speed" gain you get. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

              H Offline
              H Offline
              HakunaMatada
              wrote on last edited by
              #7

              Ok, Ok.... Use TCP.... Look, I just read somewhere that chat Apps usually use UDP for communication, OK. :sigh: --- With best regards, A Manchester United Fan The Genius of a true fool is that he can mess up a foolproof plan!

              D 1 Reply Last reply
              0
              • K kourvoisier

                Is your app communicating over the web or just a lan. If communicating over the web you may want to read up on SOAP web services.... i myself have been working on a messenger app i have gotten pretty far but not a client/server app each node is sort of a client and server itself.

                H Offline
                H Offline
                HakunaMatada
                wrote on last edited by
                #8

                I agree. This way seem much more logical.....:) --- With best regards, A Manchester United Fan The Genius of a true fool is that he can mess up a foolproof plan!

                1 Reply Last reply
                0
                • K kourvoisier

                  Is your app communicating over the web or just a lan. If communicating over the web you may want to read up on SOAP web services.... i myself have been working on a messenger app i have gotten pretty far but not a client/server app each node is sort of a client and server itself.

                  D Offline
                  D Offline
                  Dave Kreskowiak
                  wrote on last edited by
                  #9

                  What it when clicking the Reply link! Make sure your replying to the correct post. I'm not the one writing a chat app... RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

                  1 Reply Last reply
                  0
                  • H HakunaMatada

                    Ok, Ok.... Use TCP.... Look, I just read somewhere that chat Apps usually use UDP for communication, OK. :sigh: --- With best regards, A Manchester United Fan The Genius of a true fool is that he can mess up a foolproof plan!

                    D Offline
                    D Offline
                    Dave Kreskowiak
                    wrote on last edited by
                    #10

                    That's true, most of them do. But in the OP's requirements, reliable delivery requires TCP, because UDP doesn't guarantee that the packets will make it to the recipient, let alone in the orrect order. Read up on the protocols before you start making recommendations about their use! :) RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

                    H 1 Reply Last reply
                    0
                    • D Dave Kreskowiak

                      That's true, most of them do. But in the OP's requirements, reliable delivery requires TCP, because UDP doesn't guarantee that the packets will make it to the recipient, let alone in the orrect order. Read up on the protocols before you start making recommendations about their use! :) RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

                      H Offline
                      H Offline
                      HakunaMatada
                      wrote on last edited by
                      #11

                      I did know that UDP was unreliable but didn't know that it was unreliable to this extent that we couldn't trust it. Thanks for pointing that out.:) If UDP is so unreliable, why the hell is it there and what type of applications use it?? --- With best regards, A Manchester United Fan The Genius of a true fool is that he can mess up a foolproof plan!

                      D 1 Reply Last reply
                      0
                      • H HakunaMatada

                        I did know that UDP was unreliable but didn't know that it was unreliable to this extent that we couldn't trust it. Thanks for pointing that out.:) If UDP is so unreliable, why the hell is it there and what type of applications use it?? --- With best regards, A Manchester United Fan The Genius of a true fool is that he can mess up a foolproof plan!

                        D Offline
                        D Offline
                        Dave Kreskowiak
                        wrote on last edited by
                        #12

                        Save My Soul - (SMS) wrote:

                        If UDP is so unreliable, why the hell is it there and what type of applications use it??

                        Streaming media. UDP is connectionless, so you don't expect any acknowledgements back from the client, or multiple clients in broadcast. There are no retrys on packets that are lost since the send never gets notified that they've been dropped or recieved out of order. Since this is where TCP gets "bogged down", if you could call it that, UDP is a little faster. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

                        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