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. problem of socket programming with local ip

problem of socket programming with local ip

Scheduled Pinned Locked Moved C#
help
2 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.
  • M Offline
    M Offline
    mehrdad333
    wrote on last edited by
    #1

    hi take a look at my codes:

    J 1 Reply Last reply
    0
    • M mehrdad333

      hi take a look at my codes:

      J Offline
      J Offline
      Jimmanuel
      wrote on last edited by
      #2

      The client has to know where the server is. Period. There's no way that a server could notify the client of its address without the server being previously aware of the client - for the server to be previously aware of the client then the client would have had to have to connected to the server already! In other words, what you have with localEndPoint2 is unnecessary. In order for the server to notify the client where it is they would already have to be connected and that would mean your problem is already solved. Usually on the client side the server's IP Address and Port are stored in the application's configuration. Then the server starts up and starts listening on its port, and when the client starts up it reads its configuration and it knows where to connect to.

      :badger:

      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