10 years, 8 months ago.

Two TCP ports

Hi Is anybody know how I can listen two different TCP ports in the same time ?

1 Answer

10 years, 8 months ago.

Listen as in

1) wait for connection to get established 2) poll both sockets send/receive data

You should be able to do that. You will need to use "non-blocking" calls - that do not block for the operation. Often you can use timeouts instead of blocking. This way you can now poll both sockets.

Thanks for answer. Do you have any examples for this way ?

posted by Katunin Serge 27 Mar 2014