Results 1 to 2 of 2

Thread: socket connections

  1. #1

    Thread Starter
    Hyperactive Member vbzero's Avatar
    Join Date
    Aug 2000
    Location
    Vienna
    Posts
    347

    Question socket connections

    Code:
    private Socket sckTCD = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
    This creates my new socket object.
    I'm able to send via the socket and also receive data.
    But I can only receive data when I request it.

    My app does not listen on a port for incoming requests.

    Is this only possible via the TcpListener?

    If so, how can I prevent the following:

    Code:
    TcpClient myTcpClient = myTcpListener.AcceptTcpClient();
    My app is waiting for a connection and holds back all other procedures until someone has connected.

    Any ideas?

    thx!

  2. #2
    Frenzied Member Jop's Avatar
    Join Date
    Mar 2000
    Location
    Amsterdam, the Netherlands
    Posts
    1,986
    Maybe you can put that code in a seperate thread so it won't block your other procedures?
    Jop - validweb.nl

    Alcohol doesn't solve any problems, but then again, neither does milk.

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