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 Chat?!

Socket Chat?!

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

    Hey folks.. :) Im new with socket-programming and I wanna program a simple server/client-chat. You start a server client to listen for connection from clients.. Then it should be possible to send text to and from the clients. Im gonna need only a very simple but working example.. :) I also searched this site but I couldn't run the apps.. got errors so on. But I have dotNet 1.1 of course.. :) So help me out here, thanks! :-D


    - Up The Irons, Morten Kristensen

    H 1 Reply Last reply
    0
    • M Morten Kristensen

      Hey folks.. :) Im new with socket-programming and I wanna program a simple server/client-chat. You start a server client to listen for connection from clients.. Then it should be possible to send text to and from the clients. Im gonna need only a very simple but working example.. :) I also searched this site but I couldn't run the apps.. got errors so on. But I have dotNet 1.1 of course.. :) So help me out here, thanks! :-D


      - Up The Irons, Morten Kristensen

      H Offline
      H Offline
      Heath Stewart
      wrote on last edited by
      #2

      For .NET development - if you don't plan on supporting clients using other technologies - you may want to look at .NET Remoting instead. It is a much more powerful, more flexible technology and takes care of the communications automatically. The simplest designer just uses a shared assembly which defines interfaces that the server implements and that the clients user to communicate with the server through a proxy. When using the TcpChannel provided by the .NET Framework Class Library (FCL), you can even have events so that when a client sends a message to the server an event is raised and other clients can get the message immediately. If you're writing your own socket-based chat, you have to handle all this yourself. In such a case, you need to keep track of connected clients (which .NET Remoting can also do for you pretty easily, though you could use something similar to...) by storing them in a list or something and associate them to each other were appropriate. If you're having problems with the applications you've found on this site, then you should be specific about what those problems are and you should post questions on the articles' message boards since they're specific to that article.

      Microsoft MVP, Visual C# My Articles

      M 1 Reply Last reply
      0
      • H Heath Stewart

        For .NET development - if you don't plan on supporting clients using other technologies - you may want to look at .NET Remoting instead. It is a much more powerful, more flexible technology and takes care of the communications automatically. The simplest designer just uses a shared assembly which defines interfaces that the server implements and that the clients user to communicate with the server through a proxy. When using the TcpChannel provided by the .NET Framework Class Library (FCL), you can even have events so that when a client sends a message to the server an event is raised and other clients can get the message immediately. If you're writing your own socket-based chat, you have to handle all this yourself. In such a case, you need to keep track of connected clients (which .NET Remoting can also do for you pretty easily, though you could use something similar to...) by storing them in a list or something and associate them to each other were appropriate. If you're having problems with the applications you've found on this site, then you should be specific about what those problems are and you should post questions on the articles' message boards since they're specific to that article.

        Microsoft MVP, Visual C# My Articles

        M Offline
        M Offline
        Morten Kristensen
        wrote on last edited by
        #3

        Thank you Heart! :) Im gonna try the Remoting thing then :)


        - Up The Irons, Morten Kristensen

        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