Changeset 252 in flair-src for trunk/lib/FlairCore/src/ui_com.cpp


Ignore:
Timestamp:
Jul 5, 2018, 5:57:08 PM (3 years ago)
Author:
Sanahuja Guillaume
Message:

change io_data CopyDate? to RawRead?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/FlairCore/src/ui_com.cpp

    r247 r252  
    153153}
    154154
    155 void ui_com::Send(char *buf, ssize_t size) {
     155void ui_com::Send(char *buf, ssize_t size,int ttl) {
    156156  if (connection_lost == true)
    157157    return;
     
    188188    if (compressBuffer(tosend, size, &out, &out_size, 9) == Z_OK) {
    189189      size = out_size;
    190       nb_write = UDT::sendmsg(socket_fd, out, size, -1, true);
     190      nb_write = UDT::sendmsg(socket_fd, out, size,ttl, true);
    191191      free(out);
    192192    } else {
     
    197197
    198198  if (!sendItCompressed) {
    199     nb_write = UDT::sendmsg(socket_fd, tosend, size, -1, true);
     199    nb_write = UDT::sendmsg(socket_fd, tosend, size, ttl, true);
    200200  }
    201201
    202202#else // COMPRESS_FRAMES
    203   nb_write = UDT::sendmsg(socket_fd, tosend, size, -1, true);
     203  nb_write = UDT::sendmsg(socket_fd, tosend, size, ttl, true);
    204204#endif // COMPRESS_FRAMES
    205205   //Printf("write %i %i\n",nb_write,size);
     
    295295      if (offset != 3) {
    296296        memcpy(&send_buffer[1], &resume_period, sizeof(uint16_t));
    297         // printf("send %i %i %i %x %x\n",resume_period,offset,sizeof(uint16_t),send_buffer,&send_buffer[1]);
     297        //printf("send %i %i %i %x %x\n",resume_period,offset,sizeof(uint16_t),send_buffer,&send_buffer[1]);
    298298        // for(int i=0;i<offset;i++) printf("%x ",send_buffer[i]);
    299299        // printf("\n");
    300         Send(send_buffer, offset);
     300        Send(send_buffer, offset,resume_period);
    301301      }
    302302
Note: See TracChangeset for help on using the changeset viewer.