hi aradeonas,
sorry to keep pestering you, no hurt intended.
Although your changed your initial question a little, i do think the answer still applies.
I can connect my android device with an usb cable to a OS, and it will represent itself as a storage device to the operating system.
Alternatively i've downloaded some ftp-client/server from google appstore that just act similar to your average ftp client/server. ergo i can connect using a client/server on the OS, the underlying connection does not matter anymore in that case. There's also some telnet client if that would interest you.
Now, since you want to program things yourself (at least that is what i know understand from your question), things might become a little trickier.
Are there any working internet components available for android (i really have no idea), simplest would be if sockets would be working for Android (i suspect that full packages like synapse don't work (out of the box)).