ESP8266 to phone app - data transfer mechanism?

I’d like to better understand the data transfer mechanisms available to transfer data between a phone app and the ESP8266. The context is that I want the ESP8266 acting as a wifi access point. The ESP8266 is connected via uart to another MCU that’s running some application, and it’s this MCU that’s is consuming the ~1MB file from the phone app, or sending ~0.5MB sensor data to the phone app.

I came across this wifi-uart-bridge for the ESP8266 that talks to a (closed source) phone app called Roboremo. It’s not quite my application - the ESP8266 connects to router instead of being an AP, but it’s close. I’m trying to understand what the TCP server is, and just get more terms that I can google for myself.

#include <ESP8266WiFi.h>
#include <WiFiClient.h>
WiFiServer server(port);
WiFiClient client;

uint8_t buf1[1024];

server.begin(); // start TCP server  
client = server.available(); // wait for it to connect

buf1[i1] = (uint8_t); // read char from client (RoboRemo app)

Looks like the WifiServer and WifiClient is used to enable this TCP server functionality.

If I was talking to a mobile app developer, what do I tell him about how to read/write to the “TCP server”? Can I use a computer to mimic the phone app and push data up to the ESP8266? Is it HTTP GET/POST? Or something else?

My Beginner's guide to the ESP8266 could be a useful starting point. I explained some of the most important networking protocols, like TCP, and how to implement it in your ESP sketches.

Hope this helps,