src/mrt.c
// mrt_accept1: accept an incoming connection (return a connection), guaranteed to return one (will block until there is one)
accept an incoming connection (return a connection), guaranteed to return one (will block until there is one)
accept an incoming connection ( return a connection ) guaranteed to return one ( will block until there is one )
void mrt_accept1(mrt_serv_conn * sc) {
  int i;
  while (1) {
    for(i = 0; i < sc->size; i++) 
      if (sc->conns[i].initialized && !sc->conns[i].active) {
       send_ctrl_pkt(sc->fd, &sc->conns[i].addr, FLAG_SYN | FLAG_ACK, sc->conns[i].nextseq + sc->conns[i].offset, rb_size(&sc->conns[i].rb));
       sc->conns[i].active = 1;
       return;
      }
  }
}
void mrt_accept1 ( mrt_serv_conn * sc ) { int i ; while ( 1 ) { for ( i = 0 ; i < sc -> size ; i ++ ) if ( sc -> conns [ i ] . initialized && ! sc -> conns [ i ] . active ) { send_ctrl_pkt ( sc -> fd , & sc -> conns [ i ] . addr , FLAG_SYN | FLAG_ACK , sc -> conns [ i ] . nextseq + sc -> conns [ i ] . offset , rb_size ( & sc -> conns [ i ] . rb ) ) ; sc -> conns [ i ] . active = 1 ; return ; } } }
mrt_accept1: accept an incoming connection (return a connection), guaranteed to return one (will block until there is one)
mrt_accept1 : accept an incoming connection ( return a connection ) guaranteed to return one ( will block until there is one )
// mrt_connection * res; // send ack