Tech Off Thread

2 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

How-to bind all network cards

Back to Forum: Tech Off
  • User profile image
    Void

    My application needs to listen for a TCP connection on all available network cards/IPs. Is there a way to do this without creating a seperate thread for each listener?

    I thought 0.0.0.0 (IP Any) would do this but actualy it just picks the first IP/network card.

    TIA

  • User profile image
    JPeless

    You don't mention what language you are doing this in, but in C# you do it like this, at least for the declaration:

    System.Net.Sockets.TcpClient client = new System.Net.Sockets.TcpClient( new System.Net.IPEndPoint( System.Net.IPAddress.Any , 80 ) );

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.