Subject | Hash | Author | Date (UTC) |
---|---|---|---|
Indented Conn_poll_cb to better watch logs. | 58d734a8895b03eb17724eefe37e862c9665fb2c | Catalin(ux) M. BOIE | 2010-06-08 15:52:44 |
If we have POLLOUT set and the queue is empty, do not call recv function. | 2f3b266eea11dea7c28f1c24b615f667585a215e | Catalin(ux) M. BOIE | 2010-06-08 15:27:40 |
Conn_{addr,port}_{local,remote} functions added. | 47643b30ea900240e821983c89eb1f806f91c6ea | Catalin(ux) M. BOIE | 2010-06-08 15:03:52 |
Wrong cache consulted! | 6d018b014156ada0bf1a138ac2178386f6bb90ab | Catalin(ux) M. BOIE | 2010-06-08 15:03:34 |
If slot is in FREE state and we get events, do not abort, but log an error. | 52301f684bb4a49fd74556f8b15fee643c4bfb06 | Catalin(ux) M. BOIE | 2010-06-07 20:25:21 |
More verbose logging and added some TODOs. | a27014689701b1dd3d0e3c02629d3c7dd0edc77e | Catalin(ux) M. BOIE | 2010-06-07 20:24:43 |
Added Conn_[io]qlen and obsoleted Conn_qlen (ambiguous). | be3822589afe052fade15fd81afee3549217131a | Catalin(ux) M. BOIE | 2010-06-07 20:23:39 |
Use u32 field of epoll. ptr on 64bit gave an warning. | 37c86810ceaadd0c8139f11e3737577efea4cabd | Catalin(ux) M. BOIE | 2010-06-07 19:46:15 |
Export CONN_VERSION in Conn_config.h | d34d7a1da235b00c3aa1c8e0494310c4dd100886 | Catalin(ux) M. BOIE | 2010-06-07 19:45:53 |
In Conn_poll_cb, show human readable events. | a3e305582e9bf1185254f8feeab90c51af626443 | Catalin(ux) M. BOIE | 2010-06-07 17:22:49 |
Cosmetic logs. | 937e40b54fabf19d7ed2102c104585bea0181634 | Catalin(ux) M. BOIE | 2010-06-07 17:22:25 |
Export Conn_poll_status. | 8d6e2e96bd8e7a34a239533edb7484d78de69995 | Catalin(ux) M. BOIE | 2010-06-07 17:21:57 |
Bump up the version to 1.0.31. | 4a307965c1f3b1449e98c7487a8e98538d237a23 | Catalin(ux) M. BOIE | 2010-05-30 19:22:27 |
On accept() set IN+OUT flags to speed up the sending (skip an epoll_wait). | 843d55ea6c8360f4f435288cd68183029e4c06e4 | Catalin(ux) M. BOIE | 2010-05-06 17:10:14 |
Use accept4 to skip an extra fcntl call! | 3eda4a8ac828035e4205dbe13e60fa39b6d8b2c6 | Catalin(ux) M. BOIE | 2010-05-06 17:09:54 |
If the socket is in closing phase, do not change events. | 57e97028a524ab257bc8216c5a2da7381cc0d050 | Catalin(ux) M. BOIE | 2010-05-06 17:02:27 |
Avoid doing epoll_ctl using a cache. | 9bc66cd209921998195b25c2f296fd0516a1ddbb | Catalin(ux) M. BOIE | 2010-05-06 16:53:13 |
Do not call gerpeername and getsockname at every accept/connect. Do it only when needed. | d2505dbca77358b6ed67394e09904b525ea517e6 | Catalin(ux) M. BOIE | 2010-05-06 16:38:40 |
Simplified setting NONBLOCK in Conn_setnonblock. | 18d93d4daf5182e2c2749be05f7bbd43bb18bb18 | Catalin(ux) M. BOIE | 2010-05-06 16:13:34 |
strstr should not use case sensitive when searching for \n. | 50658544213ff74d0e03625c5e3fae0eadba73ad | Catalin(ux) M. BOIE | 2010-05-06 16:11:06 |
File | Lines added | Lines deleted |
---|---|---|
Conn.c | 6 | 6 |
File Conn.c changed (mode: 100644) (index d7a82e3..f8a5cf8) | |||
... | ... | static void Conn_poll_cb(const unsigned int slot, int revents) | |
1212 | 1212 | char poll_status[16]; | char poll_status[16]; |
1213 | 1213 | ||
1214 | 1214 | Conn_poll_status(revents, poll_status); | Conn_poll_status(revents, poll_status); |
1215 | Log(12, "%s: slot=%u, id=%llu, revents=%s.\n", | ||
1215 | Log(12, "\t%s: slot=%u, id=%llu, revents=%s.\n", | ||
1216 | 1216 | __FUNCTION__, slot, Conns[slot].id, poll_status); | __FUNCTION__, slot, Conns[slot].id, poll_status); |
1217 | 1217 | Conns[slot].revents = revents; | Conns[slot].revents = revents; |
1218 | 1218 | ||
1219 | 1219 | if (Conn_level >= 12) | if (Conn_level >= 12) |
1220 | Log(12, "\t%s\n", Conn_status_slot(slot)); | ||
1220 | Log(12, "\t\t%s\n", Conn_status_slot(slot)); | ||
1221 | 1221 | ||
1222 | 1222 | /* We should not have events on a free cell */ | /* We should not have events on a free cell */ |
1223 | 1223 | if (Conns[slot].state == CONN_STATE_FREE) { | if (Conns[slot].state == CONN_STATE_FREE) { |
1224 | Log(12, "\tBUG! Events on a FREE slot!\n"); | ||
1224 | Log(12, "\t\tBUG! Events on a FREE slot!\n"); | ||
1225 | 1225 | return; | return; |
1226 | 1226 | } | } |
1227 | 1227 | ||
... | ... | static void Conn_poll_cb(const unsigned int slot, int revents) | |
1248 | 1248 | } | } |
1249 | 1249 | ||
1250 | 1250 | if (Conns[slot].state == CONN_STATE_CONNECT_b) { | if (Conns[slot].state == CONN_STATE_CONNECT_b) { |
1251 | Log(12, "\tWe just established a connection.\n"); | ||
1251 | Log(12, "\t\tWe just established a connection.\n"); | ||
1252 | 1252 | ||
1253 | 1253 | Conns[slot].state = CONN_STATE_OPEN; | Conns[slot].state = CONN_STATE_OPEN; |
1254 | 1254 | ||
... | ... | static void Conn_poll_cb(const unsigned int slot, int revents) | |
1266 | 1266 | /* Second, test for hangup or input */ | /* Second, test for hangup or input */ |
1267 | 1267 | if ((revents & CONN_POLLIN) | if ((revents & CONN_POLLIN) |
1268 | 1268 | && (Conn_ignore(slot) == 0)) { | && (Conn_ignore(slot) == 0)) { |
1269 | Log(12, "\tWe have input...\n"); | ||
1269 | Log(12, "\t\tWe have input...\n"); | ||
1270 | 1270 | if (Conns[slot].type == CONN_TYPE_MASTER) { | if (Conns[slot].type == CONN_TYPE_MASTER) { |
1271 | 1271 | /* C pointer can change under us in Conn_accept->Conn_grow */ | /* C pointer can change under us in Conn_accept->Conn_grow */ |
1272 | 1272 | Conn_accept(slot); | Conn_accept(slot); |
... | ... | static void Conn_poll_cb(const unsigned int slot, int revents) | |
1282 | 1282 | ||
1283 | 1283 | if ((revents & CONN_POLLOUT) | if ((revents & CONN_POLLOUT) |
1284 | 1284 | && (Conn_ignore(slot) == 0)) { | && (Conn_ignore(slot) == 0)) { |
1285 | Log(12, "\tWe can send data...\n"); | ||
1285 | Log(12, "\t\tWe can send data...\n"); | ||
1286 | 1286 | if (Conns[slot].state == CONN_STATE_OPEN) { | if (Conns[slot].state == CONN_STATE_OPEN) { |
1287 | 1287 | if (Conns[slot].cb_send) | if (Conns[slot].cb_send) |
1288 | 1288 | Conns[slot].cb_send(&Conns[slot]); | Conns[slot].cb_send(&Conns[slot]); |