Changeset 247 in flair-src for trunk/lib/FlairCore


Ignore:
Timestamp:
May 28, 2018, 6:23:35 PM (6 years ago)
Author:
Sanahuja Guillaume
Message:

improve gcs disconnections

Location:
trunk/lib/FlairCore/src
Files:
2 edited

Legend:

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

    r243 r247  
    105105  if (UDT::setsockopt(socket_fd, 0, UDT_RCVTIMEO, &timeout, sizeof(int)) != 0)
    106106    Err("UDT::setsockopt error (UDT_RCVTIMEO)\n");
    107 
     107    /*
     108  timeout=-1;
     109  if (UDT::setsockopt(socket_fd, 0, UDT_SNDTIMEO, &timeout, sizeof(int)) != 0)
     110    Err("UDT::setsockopt error (UDT_SNDTIMEO)\n");
     111*/
    108112  bool blocking = true;
    109113  if (UDT::setsockopt(socket_fd, 0, UDT_SNDSYN, &blocking, sizeof(bool)) != 0)
     
    138142
    139143  Join();
    140 
     144 
     145  char buf=CLOSING_CONNECTION;
     146  Send(&buf,1);
     147 
    141148  if (send_buffer != NULL)
    142149    free(send_buffer);
     
    196203  nb_write = UDT::sendmsg(socket_fd, tosend, size, -1, true);
    197204#endif // COMPRESS_FRAMES
    198   // Printf("write %i %i\n",nb_write,size);
     205   //Printf("write %i %i\n",nb_write,size);
    199206  if (nb_write < 0) {
    200207    Err("UDT::sendmsg error (%s)\n", UDT::getlasterror().getErrorMessage());
  • trunk/lib/FlairCore/src/unexported/communication.h

    r234 r247  
    1212#define DATAS_LITTLE_ENDIAN 0x02
    1313#define DATAS_BIG_ENDIAN 0x03
     14#define CLOSING_CONNECTION 0x04
    1415
     16//messages file socket
    1517#define START_SENDING_FILES 0x10
    1618#define FILE_INFO_LITTLE_ENDIAN 0x11
Note: See TracChangeset for help on using the changeset viewer.