Client Socket cannot connect to running Socket server

后端 未结 3 2042
醉话见心
醉话见心 2021-01-22 17:18

I have Android client app that communicates with server using Socket.

On my development machine, SocketServer (server is also written in Java) i

3条回答
  •  终归单人心
    2021-01-22 17:54

    Try using, Port Forwarding

    From command prompt at adb location,

    adb forward tcp:8666 tcp:8666

    The forward command to set up arbitrary port forwarding — forwarding of requests on a specific host port to a different port on an emulator/device instance. Here's how you would set up forwarding of host port 8666 to emulator/device port 8666:

    If this doesn't help then post your code and logcat errors.

提交回复
热议问题