mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 08:36:24 +08:00
Debug UDP send logic
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@401 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
@@ -61,3 +61,9 @@ examples/netttest
|
||||
This is a simple network test for verifying client- and server-
|
||||
functionality in a TCP/IP connection.
|
||||
|
||||
examples/udp
|
||||
^^^^^^^^^^^^
|
||||
|
||||
This is a simple network test for verifying client- and server-
|
||||
functionality over UDP.
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ TARG_BIN = lib$(CONFIG_EXAMPLE)$(LIBEXT)
|
||||
HOSTCFLAGS += -DCONFIG_EXAMPLE_UDP_HOST=1
|
||||
ifeq ($(CONFIG_EXAMPLE_UDP_SERVER),y)
|
||||
HOSTCFLAGS += -DCONFIG_EXAMPLE_UDP_SERVER=1 \
|
||||
-DCONFIG_EXAMPLE_UDP_CLIENTIP="$(CONFIG_EXAMPLE_UDP_CLIENTIP)"
|
||||
-DCONFIG_EXAMPLE_UDP_SERVERIP="$(CONFIG_EXAMPLE_UDP_SERVERIP)"
|
||||
endif
|
||||
|
||||
HOST_SRCS = host.c
|
||||
|
||||
@@ -107,7 +107,7 @@ void send_client(void)
|
||||
message("client: %d. Sending %d bytes\n", offset, SENDSIZE);
|
||||
nbytes = sendto(sockfd, outbuf, SENDSIZE, 0,
|
||||
(struct sockaddr*)&server, sizeof(struct sockaddr_in));
|
||||
message("client: %d. Sent %d bytes\n", nbytes);
|
||||
message("client: %d. Sent %d bytes\n", offset, nbytes);
|
||||
|
||||
if (nbytes < 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user