java - Wrong byte accepted by tcp sending -
i have app in eclipse written in java , app in visual studio written in c#. have tcp connection between them.
my project sends id message. message sending worked fine until now. shows me in visual studio it's sending id number 120 example when readbyte in eclipse reads -136. said worked fine last week (i didn't used week , doesn't work now). why ? don't know if related or not 136+120 = 256. if send 125 -131 (every send gives 256). please me tommorow. thanks.
it seems significant bit in byte being flipped somehow. without seeing code there isn't more say. 0-127 use first 3 bits, , under signed representation, max value. 128 unsigned -127 signed under two's complement.
Comments
Post a Comment