I am working on one project. Client and server should use \a\b as endings of all messages. So my message could be "text\a\b"
. This one should have 6 chars. I am getting errors while I wanted to use it because java doesn't know \a escape sequence. And a bigger problem is that I can´t detect this sequence. I have tried:
char a;
if(a == '\a'){
break;
}
in a loop while I am reading input. But this doesn't work. I can't use the scanner because it blocks socket and timeout times up. Thanks a lot for your advice.