Dear all,
I am developing a sample client/server on android. This sample working
as follow:
A server is running on Android device ( HTC-HD2) and a client is
running on development desktop machine ( Running WinXp2).
HTC-HD2 using wifi network and have IP is ( 192.168.0.115). My desktop
machine using IP ( 192.168.11.87).
Server create 2 thread :
1. Receiving thread: open a socket on port
( 27000) and receive data from desktop machine
2. Sending thread: create a socket and send
data to port 64000
Client create 2 thread: One thread receive data on local socket, and
the other send data to HTC-HD2(192.168.0.115)
Both 2 sockets is created by C++ and is called through JNI. But
"Receiving thread" can not receive data on 27000 port and "Sending
thread" send data normallly. ( I used wireshark on desktop machine to
capture data,I see that, HTC-HD2 using IP 192.168.0.2 ( IP address of
router) to sending data and have data sent to port 27000 and ip
192.168.0.115).
I haved used sipdroid as a sample to contact with sipclient on deskop
and see that 2 way data is received and sent normally.
So I think that have a problem on JNI socket. ( using open source
http://code.google.com/p/destroyallhumans/source/browse/trunk/JAVA/Netcat/jni/OSNetworkSystem.cpp?spec=svn18&r=18).
Please help me to solve this problem.
Thanks in advanced.