Changeset d9ce049 in mainline for uspace/srv/net/tl/tcp/test.c
- Timestamp:
- 2011-10-04T20:40:05Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8c7a054
- Parents:
- 32105348
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/tl/tcp/test.c
r32105348 rd9ce049 45 45 #include "test.h" 46 46 47 #define RCV_BUF_SIZE 64 48 47 49 static void test_srv(void *arg) 48 50 { 49 51 tcp_conn_t *conn; 50 52 tcp_sock_t sock; 53 char rcv_buf[RCV_BUF_SIZE + 1]; 54 size_t rcvd; 55 xflags_t xflags; 51 56 52 57 printf("test_srv()\n"); … … 54 59 sock.addr.ipv4 = 0x7f000001; 55 60 tcp_uc_open(80, &sock, ap_passive, &conn); 61 62 while (true) { 63 printf("User receive...\n"); 64 tcp_uc_receive(conn, rcv_buf, RCV_BUF_SIZE, &rcvd, &xflags); 65 rcv_buf[rcvd] = '\0'; 66 printf("User received %zu bytes '%s'.\n", rcvd, rcv_buf); 67 68 async_usleep(1000*1000*2); 69 } 56 70 } 57 71
Note:
See TracChangeset
for help on using the changeset viewer.