Results 1 to 3 of 3

Thread: TCP socket question

  1. #1

    Thread Starter
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,106

    TCP socket question

    I am fairly new to .NET, and have written something that uses a socket running TCP to listen for a connection request. In VB6, you would just call socket.Listen, and when a request was made, it would raise an event.

    I am unclear on how to do the same thing in .NET, since it doesn't appear that there are any events for sockets. Surely I don't have to keep manually polling the socket for connection requests.

  2. #2
    Hyperactive Member
    Join Date
    Dec 2002
    Posts
    382
    Well normally you would manually add event handlers to your socket to handle the events. Best way to figure it out is to do a search in the forums on sockets, lots of good example code and snippets that will give you a good idea on how .Net handles it.

  3. #3

    Thread Starter
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,106
    I guess I'm too new to .NET.

    I find it interesting what MS has decided to make into a control and what they have left as a class without events. Sockets are something that make more sense responding to events than most things, but it doesn't appear to be built in.

    Or maybe I just haven't gotten to that yet.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width