def net_send(out_data, conn):
    ''' Write pending data from websocket to network. '''
    print('Sending {} bytes'.format(len(out_data)))
    conn.send(out_data)
Write pending data from websocket to network.