tonyg #1 Does it happen if define box_socket as TSocket and box_TCP as TSocketstream?I used the code here for 21mb files (it doesn't use writebyte but is a lot quicker).