At this link you can find a client-server framework. Right now its somewhat limited but it would give you a start. It can currently send messages from client to server. You can specify a port and IP address. Hope it gives you what your looking for. http://www.site.uottawa.ca/school/re...sf/ocsf231.zip
This page might give you more info
Almost forgot this right now is all in java and would be easy to port to android if you wanted to.
Sent from my Nexus 4 using XDA Premium 4 mobile app
Asus transformer tf300t, Hydro 4.3
Google Nexus 4, Stock 4.4, Unlocked