'Transfer data from room database to a local socket server Android Studio

I have designed a room database in Android studio kotlin , now I have to get all data from the phone to computer using local socket server , is this possible? If yes how

Designed the room database also created a socket server go run in the background , I have to just send the data as a whole or as a file



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source