⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 udpecho.c.rej

📁 lwIP-Softools-11Jul2002-alpha
💻 REJ
字号:
****************** 30,36 ****   *    * Author: Adam Dunkels <adam@sics.se>   *-  * $Id: udpecho.c,v 1.1 2001/12/12 10:00:54 adam Exp $   */    #include "lwip/api.h"--- 30,36 ----   *    * Author: Adam Dunkels <adam@sics.se>   *+  * $Id: udpecho.c,v 1.2 2002/01/23 19:50:56 adam Exp $   */    #include "lwip/api.h"****************** 44,49 ****    static struct netbuf *buf;    static struct ip_addr *addr;    static unsigned short port;        conn = netconn_new(NETCONN_UDP);    netconn_bind(conn, NULL, 7);--- 44,50 ----    static struct netbuf *buf;    static struct ip_addr *addr;    static unsigned short port;+   char buffer[4096];        conn = netconn_new(NETCONN_UDP);    netconn_bind(conn, NULL, 7);****************** 54,59 ****      port = netbuf_fromport(buf);      netconn_connect(conn, addr, port);      netconn_send(conn, buf);      netbuf_delete(buf);    }  }--- 55,62 ----      port = netbuf_fromport(buf);      netconn_connect(conn, addr, port);      netconn_send(conn, buf);+     netbuf_copy(buf, buffer, sizeof(buffer));+     printf("got %s\n", buffer);      netbuf_delete(buf);    }  }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -