The reason the transfer stops is because you're not following the DCC protocol: this requires the receiver to acknowledge all received data by sending back the total number of received bytes.

Code that should work: (but has not been tested at all)
on *:SOCKREAD:dcc.*:{
  if ($sockerr) { echo sockerror! | return }
  sockread 4096 &dcc
  while ($sockbr) {
    bwrite %filename -1 -1 &dcc
    sockread 4096 &dcc

  ;get number of received bytes
  var %rcvd = $sock($sockname).rcvd
  ;$longip converts this from decimal to base 256 
  ;  (you could use some complicated $calc with a lot of % 256 but this takes less code)
  ;then replace the dots with spaces, put it in the binvar and send it
  bset &rcvd 1 $replace($longip(%rcvd),.,$chr(32))
  sockwrite $sockname &rcvd

$input(Me like stars, You too?)