diff --git a/src/algo_naive.c b/src/algo_naive.c index b238efd..ecd6f55 100644 --- a/src/algo_naive.c +++ b/src/algo_naive.c @@ -168,6 +168,7 @@ void on_tcp_read(struct evt_core_ctx* ctx, struct evt_core_fdinfo* fdinfo) { printf("wil be forwarded to: %s\n", url); to_fdinfo = evt_core_get_from_url (ctx, url); if (to_fdinfo == NULL) goto co_error; + printf("A full UDP packet has been read from TCP\n"); // 4. We move the buffer and notify the target mv_buffer_rtow (app_ctx, fdinfo, to_fdinfo, bp); @@ -193,6 +194,7 @@ void on_tcp_write(struct evt_core_ctx* ctx, struct evt_core_fdinfo* fdinfo) { if (write_res == FDS_ERR) goto co_error; } if (bp->mode != BP_READING) return; + printf("A full UDP packet has been written to TCP\n"); // 3. A whole packet has been written // Release the buffer and notify @@ -220,6 +222,7 @@ void on_udp_read(struct evt_core_ctx* ctx, struct evt_core_fdinfo* fdinfo) { read_res = read_packet_from_udp (fdinfo->fd, bp); if (read_res == FDS_ERR) goto co_error; if (bp->mode != BP_WRITING) return; + printf("A full UDP packet has been read from UDP\n"); // 3. A whole packet has been read, we will find someone to write it sprintf(url, "tcp:write:127.0.0.1:7500"); @@ -249,6 +252,7 @@ void on_udp_write (struct evt_core_ctx* ctx, struct evt_core_fdinfo* fdinfo) { write_res = write_packet_to_udp(fdinfo->fd, bp); if (write_res == FDS_ERR) goto co_error; if (bp->mode != BP_READING) return; + printf("A full UDP packet has been written to UDP\n"); // 3. A whole packet has been written // Release the buffer and notify