DataReceived type event for tcpclient network stream?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • JamesB

    DataReceived type event for tcpclient network stream?

    I have a service and a client forms app - I want to be able to have the
    service send data back to the client app intermittently, and I've
    established a connection between the two using tcpclient.
    What I can't see is any sort of event I can use that will be triggered when
    data is received at the client. Is there such a thing?
    Or should I create a separate "listening" thread that polls the connection
    for data and then triggers whatever I need to happen? Or is there a better
    way?

    Thanks!

  • christery@gmail.com

    #2
    Re: DataReceived type event for tcpclient network stream?

    On 17 Feb, 12:27, "JamesB" <jam...@somewhe re.com.net.com. netwrote:
    I have a service and a client forms app - I want to be able to have the
    service send data back to the client app intermittently, and I've
    established a connection between the two using tcpclient.
    What I can't see is any sort of event I can use that will be triggered when
    data is received at the client. Is there such a thing?
    Or should I create a separate "listening" thread that polls the connection
    for data and then triggers whatever I need to happen? Or is there a better
    way?
    >
    Thanks!
    Hah, using network, tcpip... hahaha... that wont work... neither I
    will google have that ansver, nor usse msdn, just give up... pick up a
    RS-232 manual, or maybe a disc, mailing in that between tha PC:s.

    No, there is lots of examples how you should do it, it depends on what
    you are going to do in the future that holds me back. a point to point
    is good for a while, then it gets into a hub-and-spoke and after a
    while you are looking for a ESB solution and integrating that to an
    already established SOA architecture migrating from UDDI to whatever..
    no I wont go there...

    Stay away from tcpip.. networks... evil, EVIL I say... ;)

    Comment

    • Steve Gerrard

      #3
      Re: DataReceived type event for tcpclient network stream?

      JamesB wrote:
      I have a service and a client forms app - I want to be able to have
      the service send data back to the client app intermittently, and I've
      established a connection between the two using tcpclient.
      So you presumably have a Listener in the service, waiting for a call from the
      client...
      What I can't see is any sort of event I can use that will be
      triggered when data is received at the client. Is there such a thing?
      Seems like a mirror image setup would work: your client app also sets up a
      listener, and the service calls it when it has some stuff...


      Comment

      Working...