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. is sending data over a same socket possible

is sending data over a same socket possible

Scheduled Pinned Locked Moved C#
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
    Mubeen asim
    wrote on last edited by
    #1

    hello....i have created a socket in my application and i need to send the data over an interval of 10 seconds so am creating a new socket in the timer. the problem with this approach is that the application is creating a new socket every 10 seconds so that my server is getting lots of exceptions... may i know is it possible to send the data over a single socket insted of creating a new socket every time i need to send the data.. thanks...

    L 1 Reply Last reply
    0
    • M Mubeen asim

      hello....i have created a socket in my application and i need to send the data over an interval of 10 seconds so am creating a new socket in the timer. the problem with this approach is that the application is creating a new socket every 10 seconds so that my server is getting lots of exceptions... may i know is it possible to send the data over a single socket insted of creating a new socket every time i need to send the data.. thanks...

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

      Just create 1 socket connection. Just write to that stream every 10s. You don't need to create a socket connection every 10s.

      M 1 Reply Last reply
      0
      • L Lost User

        Just create 1 socket connection. Just write to that stream every 10s. You don't need to create a socket connection every 10s.

        M Offline
        M Offline
        Mubeen asim
        wrote on last edited by
        #3

        thans for that... but am using asynchronous sockets.. so i would be thankful for u if u give me a hint how to write to the single socket stream....

        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