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 Connection, help me please!!!!

Socket Connection, help me please!!!!

Scheduled Pinned Locked Moved C#
sysadminhelptutorial
4 Posts 3 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.
  • V Offline
    V Offline
    Vampire1986hieu
    wrote on last edited by
    #1

    I've a project about socket and have some trouble.... I've create a serverSocket on port 80 of a server : (IPserver,80) And then create a clientSocket on port 80 of some clients: (IPclients,80) So i need a code to do First I've created a serverSocket and listening communicate from clientSocket (done) Second I need a code on clientSocket to do 0. Create clientSocket 1. Connect to serverSocket 2. To do something.. 3. Disconnect 4. Sleep and wait 5. Connect to serverSocket 6. To do something.. 7. Disconnect 8. Destroy clientSocket I don't know how to code method Create clientSocket, method Connect to serverSocket, method Disconnect. Anyway thanks for your reply

    Le Trung Hieu

    G R 2 Replies Last reply
    0
    • V Vampire1986hieu

      I've a project about socket and have some trouble.... I've create a serverSocket on port 80 of a server : (IPserver,80) And then create a clientSocket on port 80 of some clients: (IPclients,80) So i need a code to do First I've created a serverSocket and listening communicate from clientSocket (done) Second I need a code on clientSocket to do 0. Create clientSocket 1. Connect to serverSocket 2. To do something.. 3. Disconnect 4. Sleep and wait 5. Connect to serverSocket 6. To do something.. 7. Disconnect 8. Destroy clientSocket I don't know how to code method Create clientSocket, method Connect to serverSocket, method Disconnect. Anyway thanks for your reply

      Le Trung Hieu

      G Offline
      G Offline
      garyshort
      wrote on last edited by
      #2

      You should start off by examining the System.Net namespace in the .Net framework. Then if you have a specific question post it here.

      -- Cheers, Gary http://www.garyshort.org

      1 Reply Last reply
      0
      • V Vampire1986hieu

        I've a project about socket and have some trouble.... I've create a serverSocket on port 80 of a server : (IPserver,80) And then create a clientSocket on port 80 of some clients: (IPclients,80) So i need a code to do First I've created a serverSocket and listening communicate from clientSocket (done) Second I need a code on clientSocket to do 0. Create clientSocket 1. Connect to serverSocket 2. To do something.. 3. Disconnect 4. Sleep and wait 5. Connect to serverSocket 6. To do something.. 7. Disconnect 8. Destroy clientSocket I don't know how to code method Create clientSocket, method Connect to serverSocket, method Disconnect. Anyway thanks for your reply

        Le Trung Hieu

        R Offline
        R Offline
        ramdil
        wrote on last edited by
        #3

        Hi create two ports which should be available in network one is for listening and one is for recieving that means listner port will be the receiver port in another side and vice versa then inside the listen method use the start method and send method inside the reciever method use the start method and recieve method of socket ..after that use stop method or close method in connectin close Hope u have got some fair idea from this.Lots of examples are their in code project...

        Regards DilipRam

        V 1 Reply Last reply
        0
        • R ramdil

          Hi create two ports which should be available in network one is for listening and one is for recieving that means listner port will be the receiver port in another side and vice versa then inside the listen method use the start method and send method inside the reciever method use the start method and recieve method of socket ..after that use stop method or close method in connectin close Hope u have got some fair idea from this.Lots of examples are their in code project...

          Regards DilipRam

          V Offline
          V Offline
          Vampire1986hieu
          wrote on last edited by
          #4

          Thanks for your help. But I only use one port(80).

          Le Trung Hieu

          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