dickersonka
Veteran Poster
1,175 posts since Aug 2008
Reputation Points: 130
Solved Threads: 143
dickersonka
Veteran Poster
1,175 posts since Aug 2008
Reputation Points: 130
Solved Threads: 143
i don't think it will return null, until the socket gets closed
not for sure if this is the terminator, but did you check for "." (period) with crlf?
also check -1
dickersonka
Veteran Poster
1,175 posts since Aug 2008
Reputation Points: 130
Solved Threads: 143
nm, think i was thinking of something else
can you please post the server and client code, at least the guts part where its sending and receiving
dickersonka
Veteran Poster
1,175 posts since Aug 2008
Reputation Points: 130
Solved Threads: 143
sorry don't have time to debug it right now,
are you getting an ioexception in the server from the first trycatch?
dickersonka
Veteran Poster
1,175 posts since Aug 2008
Reputation Points: 130
Solved Threads: 143
dickersonka
Veteran Poster
1,175 posts since Aug 2008
Reputation Points: 130
Solved Threads: 143
and also just to make sure you aren't running client and server on the same machine are you?
dickersonka
Veteran Poster
1,175 posts since Aug 2008
Reputation Points: 130
Solved Threads: 143
and also just to make sure you aren't running client and server on the same machine are you?
I have never had trouble running a server and client on the same machine before, but I haven't looked through the code here to see if they are doing anything different than I usually do. However in an earlier post the OP postedit reads information:
"
POST / HTTP/1.1
Connection: close
Keep-Alive: 300
User-Agent: Java/1.6.0_07
Host: localhost:2604
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Content-type: application/x-www-form-urlencoded
Content-Length: 38
Looking at where it says Host: localhost:2604 led me to believe it is being run on the same machine.
jasimp
Senior Poster
3,623 posts since Aug 2007
Reputation Points: 533
Solved Threads: 53
ah hah, forgot to look at the previous post, i've had some trouble, normally not, but sometimes yes, just want to try and eliminate all possibilities
dickersonka
Veteran Poster
1,175 posts since Aug 2008
Reputation Points: 130
Solved Threads: 143
lol it is working and you are asking what is wrong?
what part doesn't work? or you mean why it didn't work before?
dickersonka
Veteran Poster
1,175 posts since Aug 2008
Reputation Points: 130
Solved Threads: 143
i believe its because you have to "tell" the server when you are done sending, since you want the server to send the request back you have to say i'm done, now send the information
dickersonka
Veteran Poster
1,175 posts since Aug 2008
Reputation Points: 130
Solved Threads: 143