… | |
… | |
422 | } |
422 | } |
423 | |
423 | |
424 | sbuf[0] = ((uint32) (msg->length ()) >> 8); |
424 | sbuf[0] = ((uint32) (msg->length ()) >> 8); |
425 | sbuf[1] = ((uint32) (msg->length ()) ); |
425 | sbuf[1] = ((uint32) (msg->length ()) ); |
426 | |
426 | |
427 | if (ns->status != Ns_Old) |
427 | //TODO: single write, or writev |
428 | ns->send (sbuf, 2); |
428 | ns->send (sbuf, 2); |
429 | |
|
|
430 | ns->send (msg->buf, msg->length ()); |
429 | ns->send (msg->buf, msg->length ()); |
431 | } |
430 | } |
432 | |
431 | |
433 | /****************************************************************************** |
432 | /****************************************************************************** |
434 | * |
433 | * |
… | |
… | |
459 | LOG (llevInfo, "CSSTAT: %.16s tot %d %d %d %d inc %d %d %d %d\n", |
458 | LOG (llevInfo, "CSSTAT: %.16s tot %d %d %d %d inc %d %d %d %d\n", |
460 | ctime (&now), cst_tot.ibytes, cst_tot.obytes, cst_tot.max_conn, |
459 | ctime (&now), cst_tot.ibytes, cst_tot.obytes, cst_tot.max_conn, |
461 | now - cst_tot.time_start, cst_lst.ibytes, cst_lst.obytes, cst_lst.max_conn, now - cst_lst.time_start); |
460 | now - cst_tot.time_start, cst_lst.ibytes, cst_lst.obytes, cst_lst.max_conn, now - cst_lst.time_start); |
462 | cst_lst.ibytes = 0; |
461 | cst_lst.ibytes = 0; |
463 | cst_lst.obytes = 0; |
462 | cst_lst.obytes = 0; |
464 | cst_lst.max_conn = socket_info.nconns; |
|
|
465 | cst_lst.time_start = now; |
463 | cst_lst.time_start = now; |
466 | } |
464 | } |
467 | #endif |
465 | #endif |
468 | |
466 | |