Results 1 to 3 of 3

Thread: blocking tcp server ?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2005
    Posts
    84

    Question blocking tcp server ?

    hi, i am setting up a tcp server, and was wondering if there is a way to have the Listen() method block the calling thread, or to get a notification when a connection attempt is made.

    Also, as a side note, is there a way to determine the source address of an attempted connection before accepting/denying it?

    Thx in advance,
    John

  2. #2
    Junior Member
    Join Date
    Oct 2004
    Posts
    26

    Re: blocking tcp server ?

    i don't understand exactly what you want but the metod is this :
    VB Code:
    1. private sub Form_Load
    2. sckListen.LocalPort = 9999
    3. sckListen.Listen
    4. end sub
    5.  
    6.  
    7. Private Sub sckListen_ConnectionRequest(ByVal requestID As Long)    
    8.       sckListen.Close  
    9.       sckListen.Accept requestID  
    10. End Sub
    U`ll Never Get To HEAVEN If U`re Scared Of Gettin` HIGH

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Feb 2005
    Posts
    84

    Re: blocking tcp server ?

    whoops sry, i forgot to specify i am in vb.net or c#.net, not the legacy vb

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