Appologies @[member='hplus0603'], I completely missed your reply. Many thanks for the thorough explanation. Yes I actually meant KB, but as usual my fingers been lazy i wrote kb. Thanks
Thanks @[member='TheChubu'], I'm looking into your suggestion right now...
Here is the crash dump, i ran again just now using another port number. @[member='rip-off'], says its a bad idea using netstat port number, following up on that i'm trying 8000, 80, 45210, 8080, it crash-stopped for all ... got to say my novice-ness in socket programming is laid bare now :(
If not in netstat, how do i get the proper port number?
I have no clues what this crash dump says, I only know the crash point by my print-outs. It prints 02 but not 03 so the line code below is the culprit. A disgrace on me that i'm using the elementary method to find the crash line... but sometimes its the quickest
sock = new Socket(serverIP, 45210);
Crash Dump/ STrace
02-26 19:51:46.802: V/qcd(5461): 00
02-26 19:51:46.802: V/qcd(5461): 01
02-26 19:51:46.802: V/qcd(5461): 02
02-26 19:51:46.812: D/AndroidRuntime(5461): Shutting down VM
02-26 19:51:46.812: E/AndroidRuntime(5461): FATAL EXCEPTION: main
02-26 19:51:46.812: E/AndroidRuntime(5461): Process: com.clienserver.fsendfileactivity, PID: 5461
02-26 19:51:46.812: E/AndroidRuntime(5461): android.os.NetworkOnMainThreadException
02-26 19:51:46.812: E/AndroidRuntime(5461): at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1147)
02-26 19:51:46.812: E/AndroidRuntime(5461): at libcore.io.BlockGuardOs.connect(BlockGuardOs.java:110)
02-26 19:51:46.812: E/AndroidRuntime(5461): at libcore.io.IoBridge.connectErrno(IoBridge.java:137)
02-26 19:51:46.812: E/AndroidRuntime(5461): at libcore.io.IoBridge.connect(IoBridge.java:122)
02-26 19:51:46.812: E/AndroidRuntime(5461): at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:183)
02-26 19:51:46.812: E/AndroidRuntime(5461): at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:163)
02-26 19:51:46.812: E/AndroidRuntime(5461): at java.net.Socket.startupSocket(Socket.java:590)
02-26 19:51:46.812: E/AndroidRuntime(5461): at java.net.Socket.tryAllAddresses(Socket.java:128)
02-26 19:51:46.812: E/AndroidRuntime(5461): at java.net.Socket.<init>(Socket.java:178)
02-26 19:51:46.812: E/AndroidRuntime(5461): at java.net.Socket.<init>(Socket.java:150)
02-26 19:51:46.812: E/AndroidRuntime(5461): at com.clienserver.fsendfileactivity.FSendfileActivity$2.onClick(FSendfileActivity.java:69)
02-26 19:51:46.812: E/AndroidRuntime(5461): at android.view.View.performClick(View.java:5197)
02-26 19:51:46.812: E/AndroidRuntime(5461): at android.view.View$PerformClick.run(View.java:20926)
02-26 19:51:46.812: E/AndroidRuntime(5461): at android.os.Handler.handleCallback(Handler.java:739)
02-26 19:51:46.812: E/AndroidRuntime(5461): at android.os.Handler.dispatchMessage(Handler.java:95)
02-26 19:51:46.812: E/AndroidRuntime(5461): at android.os.Looper.loop(Looper.java:145)
02-26 19:51:46.812: E/AndroidRuntime(5461): at android.app.ActivityThread.main(ActivityThread.java:5951)
02-26 19:51:46.812: E/AndroidRuntime(5461): at java.lang.reflect.Method.invoke(Native Method)
02-26 19:51:46.812: E/AndroidRuntime(5461): at java.lang.reflect.Method.invoke(Method.java:372)
02-26 19:51:46.812: E/AndroidRuntime(5461): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1400)
02-26 19:51:46.812: E/AndroidRuntime(5461): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1195)