The sending / receiving of data has nothing to do with the topology. In fact, when you have one ESP8266 as an access point and another as a station that is no different to having two ESP8266's as stations communicating through an access point. The topology is transparent to the communication of user data as that is a completely different (lower) layer of the OSI model and as such is hidden from the layers above.
You communicate in exactly the same way regardless of your topology. That is - one end opens a socket of some form and the other end connects to (for TCP) and sends data to (for both TCP and UDP) that socket. For TCP the "server" socket can then also send data back through the same connection. For UDP there is no "server" as such, but just two peers that send data to each other and for two-way communication both ends need to be a "server" to receive data.
What you need to do is define what data you want to send and what method of sending that data will be most suitable for your system - be that simple UDP packets, or something more complex like one of the many HTTP-based API systems.