M micro Well-Known Member Licensed User Longtime User Jul 18, 2020 #1 Hi to all is there a way to get ip from a stream of a socket? B4X: Dim jo As JavaObject = NewSocket Dim ip As String = jo.GetFieldJO("socket").RunMethodJO("getInetAddress", Null).RunMethod("getHostAddress", Null) For Stream? Thanks
Hi to all is there a way to get ip from a stream of a socket? B4X: Dim jo As JavaObject = NewSocket Dim ip As String = jo.GetFieldJO("socket").RunMethodJO("getInetAddress", Null).RunMethod("getHostAddress", Null) For Stream? Thanks
Erel B4X founder Staff member Licensed User Longtime User Jul 19, 2020 #2 How is the stream created? Upvote 0
M micro Well-Known Member Licensed User Longtime User Jul 19, 2020 #3 Erel said: How is the stream created? Click to expand... B4X: Dim ast As AsyncSteamsText ast.Initialize(Me, "ast", NewSocket.InputStream, NewSocket.OutputStream) Best regards Upvote 0
Erel said: How is the stream created? Click to expand... B4X: Dim ast As AsyncSteamsText ast.Initialize(Me, "ast", NewSocket.InputStream, NewSocket.OutputStream) Best regards
Erel B4X founder Staff member Licensed User Longtime User Jul 19, 2020 #4 You need to get it from NewSocket. You cannot get it from the stream. Upvote 0