Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

girish.sj

macrumors newbie
Original poster
May 21, 2009
16
0
senario:
client running on java platform running on windows. client uses socket APIs used in java.net.*
server running on iphone, I am using basic socket framework provided by deusty "http://code.google.com/p/cocoaasyncsocket/source/browse/#svn/trunk". when the client makes a connection, at server new socket is accepted, also able to write to socket successfully without any error at server side.

When read happens at client side gives an exception like
java.io.StreamCorruptedException: invalid stream header
at java.io_ObjectInputStream.readStreamHeader(Unknown Source)
at java.io_ObjectInputStream.<init>(Unknown Source)
at Requester.run(Requester.java:22)
at Requester.main(Requester.java:80)
Exception in thread "main" java.lang.NullPointerException
at Requester.run(Requester.java:57)
at Requester.main(Requester.java:80)

But when iphone is made as client and server on other platform there is no errors in communication either ways( data can be read and written both sides).
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.