open "SOCL:127.0.0.1:10000" as #1 for ii = 0 to n data[ii] = bgetc(1) next ii Every time the server sends a byte with the decimal value of 13 bgetc(1) does not receive the byte. Otherwise data transfer is fine. In file src/common/inet2.c line 172 is written: if (ch != '\015') { // ignore it buf[count] = ch; count += bytes; // actually ++ } I think this might be the reason why byte with value 13 is not received, because decimal 13 is octal 15.