Android Question ServerSocket binding to localhost only?

_marek

Member
Licensed User
Longtime User
Hello,
is there a way to bind ServerSocket to localhost only (so it accepts connections only from localhost)? Or is the socket always bound to all existing network interfaces and it cannot be changed?

Thanks,
Marek
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Upvote 0
Solution

_marek

Member
Licensed User
Longtime User
It works (also in release mode). Server now accepts only localhost connections. Thanks.

So question now is, can jNetwork replace Network (B4A) library in B4A project? I am using ServerSocket, Socket, UDPSocket from B4A Network lib. Quick test shows that after switching from B4A Network to jNetwork all is working OK. Can this be confirmed please?

What about serverSocket.GetMyWifiIP from B4A Network? Can`t find any substitution in jNetwork lib.

Thanks again.
 
Upvote 0
Top