AsyncStream over Socket Connection

XverhelstX

Well-Known Member
Licensed User
Longtime User
Send file over Socket Connection to WiFi IpAdress

Heey everyone,

I have two devices that connect to each other with bluetooth.

Now I have made a socket connection between the two and I want to send a file/upload to the ip address but not to the device..
Not just a file but an Index.html file, so you can actually view the file from your desktop's browser.
In a source, i saw that this is possible on the WiFi IP adress with the port.
So if you go to http://192.168.1.xxx:10130 in your browser you could actually see the index.html file as a normal webpage. Is this possible, and how would you achieve this, toghether with sending images.

Something like this?

B4X:
Dim out As OutputStream
Dim buffer() As Byte
out = File.OpenOutput(File.DirRootExternal,"index.html",False)
out.InitializeToBytesArray(0)
out.WriteBytes(buffer,0,buffer.Length)
Dim req As HttpRequest
req.InitializePost2("192.168.1.105:8080",buffer)
 HTTPClient1.Execute(req, 1)

XverhelstX
 
Last edited:
Top