ithewei 5 vuotta sitten
vanhempi
commit
2bad4f50ae
1 muutettua tiedostoa jossa 5 lisäystä ja 5 poistoa
  1. 5 5
      event/overlapio.c

+ 5 - 5
event/overlapio.c

@@ -27,7 +27,7 @@ int post_acceptex(hio_t* listenio, hoverlapped_t* hovlp) {
         HV_ALLOC(hovlp->buf.buf, hovlp->buf.len);
     }
     hovlp->fd = connfd;
-    hovlp->event = READ_EVENT;
+    hovlp->event = HV_READ;
     hovlp->io = listenio;
     if (AcceptEx(listenio->fd, connfd, hovlp->buf.buf, 0, sizeof(struct sockaddr_in6), sizeof(struct sockaddr_in6),
         &dwbytes, &hovlp->ovlp) != TRUE) {
@@ -45,7 +45,7 @@ int post_recv(hio_t* io, hoverlapped_t* hovlp) {
         HV_ALLOC_SIZEOF(hovlp);
     }
     hovlp->fd = io->fd;
-    hovlp->event = READ_EVENT;
+    hovlp->event = HV_READ;
     hovlp->io = io;
     if (io->readbuf.base == NULL || io->readbuf.len == 0) {
         hio_set_readbuf(io, io->loop->readbuf.base, io->loop->readbuf.len);
@@ -216,7 +216,7 @@ end:
 }
 
 static void hio_handle_events(hio_t* io) {
-    if ((io->events & READ_EVENT) && (io->revents & READ_EVENT)) {
+    if ((io->events & HV_READ) && (io->revents & HV_READ)) {
         if (io->accept) {
             on_acceptex_complete(io);
         }
@@ -247,7 +247,7 @@ int hio_accept (hio_t* io) {
     for (int i = 0; i < ACCEPTEX_NUM; ++i) {
         post_acceptex(io, NULL);
     }
-    return hio_add(io, hio_handle_events, READ_EVENT);
+    return hio_add(io, hio_handle_events, HV_READ);
 }
 
 int hio_connect (hio_t* io) {
@@ -294,7 +294,7 @@ error:
 
 int hio_read (hio_t* io) {
     post_recv(io, NULL);
-    return hio_add(io, hio_handle_events, READ_EVENT);
+    return hio_add(io, hio_handle_events, HV_READ);
 }
 
 int hio_write(hio_t* io, const void* buf, size_t len) {