I'm trying to get a connection via TCP sockets from my Phone that is plugged via USB to the PC. It does not seem to work. The Socket.ConnectAsync
returns a Success, so the hostname (name of my PC) is correctly resolved. However, the first Socket.SendAsync
ends up in a Connection Reset.
It works with the emulator and if the PC and phone are in the same private WiFi network, but never via the USB connection.
This is kind of strange, since HTTP traffic seems to work quite well: The phone's browser can connect to my PC's webserver (with both PC and phone beeing offline, just connected via USB) and a small test app can connect via HTTP (WebClient
) to the PC, like asked in this SO question here.
So my question is, as there must be some security restriction that I did not discover yet, or some technical restriction: How can I get it to work, and if not, why?
Thanks in advance for any help with this!