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. Socket issue

Socket issue

Scheduled Pinned Locked Moved C#
sysadminquestionhelp
3 Posts 2 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.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    Hi, I created an socket program where a server listen and number of clients connect to it. Clients have a common static ip and individual local ip of their own system. In client side if i give Socket.LocalEndPoint i get the local IP address of the client, same i check in the serverside, ie Socket.RemoteEndPoint i get the static IP of the clients network. so all the client IP shown in the server as same. How can i identify each clients? Will there be same port in diffrent system in a network of a single static IP? Thanks, Yesuprakash

    C 1 Reply Last reply
    0
    • L Lost User

      Hi, I created an socket program where a server listen and number of clients connect to it. Clients have a common static ip and individual local ip of their own system. In client side if i give Socket.LocalEndPoint i get the local IP address of the client, same i check in the serverside, ie Socket.RemoteEndPoint i get the static IP of the clients network. so all the client IP shown in the server as same. How can i identify each clients? Will there be same port in diffrent system in a network of a single static IP? Thanks, Yesuprakash

      C Offline
      C Offline
      carbon_golem
      wrote on last edited by
      #2

      I'm not so sure you can distinguish that info with the socket alone. I've always spun up a new thread or created new objects to deal with the new socket connection, so I knew that they were different. If you need some kind of identification, you'll need to transmit that information from the client to server on a connection, or request it from the server. Bottom line I think is that you'll need to program it into the client. Hope that helped... Scott P

      "Simplicity carried to the extreme becomes elegance."
      -Jon Franklin

      L 1 Reply Last reply
      0
      • C carbon_golem

        I'm not so sure you can distinguish that info with the socket alone. I've always spun up a new thread or created new objects to deal with the new socket connection, so I knew that they were different. If you need some kind of identification, you'll need to transmit that information from the client to server on a connection, or request it from the server. Bottom line I think is that you'll need to program it into the client. Hope that helped... Scott P

        "Simplicity carried to the extreme becomes elegance."
        -Jon Franklin

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

        hi, Currently i am developing a client server application in c#. I am using socket for communication. With compare to remoting and WCF, is it socket is better?.. or which is good. How can i convert socket to WCF or Remoting? Thankyou, Yesuprakash

        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