You can definitely create a TCP server on Android.
The code would look like this:
ServerSocket serverSocket = null;
boolean listening = true;
try {
serverSocket = new ServerSocket(1101);
} catch (IOException e) {
System.err.println("Could not listen on port: 1101.");
System.exit(-1);
}
while (listening)
new Server_Thread(serverSocket.accept()).start();
serverSocket.close();
On Wednesday, January 9, 2013 3:41:22 AM UTC-6, tom wrote:
>
> Hi,
>
> *why couldn't create webservice using android?*
> if that any reason. if you know that reason...please share with me..
>
> Thanks,
> Tom
>
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en