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. TCP or HTTP

TCP or HTTP

Scheduled Pinned Locked Moved C#
csharpperformance
5 Posts 4 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.
  • A Offline
    A Offline
    amitcoder83
    wrote on last edited by
    #1

    all the following is with respect to C#.Net In remoting for better speed we opt for TCP channel. why is TCP is faster than HTTP.

    M L 2 Replies Last reply
    0
    • A amitcoder83

      all the following is with respect to C#.Net In remoting for better speed we opt for TCP channel. why is TCP is faster than HTTP.

      M Offline
      M Offline
      Manoj Kumar Rai
      wrote on last edited by
      #2

      If you use Socket you get more speed.:-)

      Manoj Never Gives up

      A 1 Reply Last reply
      0
      • M Manoj Kumar Rai

        If you use Socket you get more speed.:-)

        Manoj Never Gives up

        A Offline
        A Offline
        amitcoder83
        wrote on last edited by
        #3

        socket or remoting whichever be the case,but why is that TCP faster than HTTP

        O 1 Reply Last reply
        0
        • A amitcoder83

          socket or remoting whichever be the case,but why is that TCP faster than HTTP

          O Offline
          O Offline
          originSH
          wrote on last edited by
          #4

          When sending over TCP you don't have to do much other than serialize the objects and chuck them over the connection. Using HTTP you have to use the HTTP protocol which takes more time and bandwidth. You also have the choice of the Binary Serialization and SOAP serialization. Binary makes the smallest output but SOAP is better for interop with other system or if you need the output to be human redable. In the end you need to choose which is the right combination for you based on what you need. If you need built in security and authentication then HTTP remoting via IIS is best, it also works well with firewalls. If your just working on an intranet or you really need the performance TCP will be fine.

          1 Reply Last reply
          0
          • A amitcoder83

            all the following is with respect to C#.Net In remoting for better speed we opt for TCP channel. why is TCP is faster than HTTP.

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

            Depending if you are on the local machine, you can even use IPC, which is alot faster than TCP or HTTP.

            **

            xacc.ide-0.2.0.57 - now with C# 2.0 parser and seamless VS2005 solution support!

            **

            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