def _net_write(sock, data, expiration):
 current = 0
 l = len(data)
 while (current < l):
  _wait_for_writable(sock, expiration)
  current += sock.send(data[current:])

def _net_write ( sock , data , expiration ) : current = 0 l = len ( data ) while ( current < l ) : _wait_for_writable ( sock , expiration ) current += sock . send ( data [ current : ] )
write the specified data to the socket .