How to decide which network interface a socket is listen on?

axellin
Posts: 197
Joined: Mon Sep 17, 2018 9:09 am

How to decide which network interface a socket is listen on?

Postby axellin » Fri Jan 17, 2020 3:03 am

Hi,

My device is running as an AP (mainly for configuration) and also running pppos to reach internet.
I'm wondering when start a tcp server listen on a given port, which interface the socket is listen on?
Can I decide which interface to listen on?
It does not make sense to listen on the ppp interface, so I'd like to just make my tcp server only
listen on either AP or STA interface.
My tcp server seems does not work if started pppos, but it works fine without starting pppos.

BTW, I hit some problems when start AP/STA and pppos at the same time.
see https://github.com/espressif/esp-idf/issues/4634
Appreciate if someone can help.

Who is online

Users browsing this forum: Majestic-12 [Bot], netfox and 174 guests