luckyyaojin opened a new pull request, #3372:
URL: https://github.com/apache/nuttx-apps/pull/3372

   ## Summary
   Analyze parameters to determine whether to use non blocking mode and whether 
to delay before exiting.
   
   Mainly used for quickly establishing connections, sending a small message 
and immediately disconnecting, multiple runs can simulate the "multiple 
connections" scenario, and cooperate with server-side logic to verify the 
reliability or concurrency pressure of short connections.f the delay parameter 
is enabled, sleep for 1 second after normal completion, then close the socket 
and release the buffer.
   
   Analyze parameters to determine whether to use non blocking mode and whether 
to delay before exiting.
   
   ## Impact
   none
   
   ## Testing
   
   server cmd and log
   qemu-armv8a-server>  rpsock_server server_multi_times block hh ap 3
   server_multi_times: 0
   server: create socket SOCK_STREAM nonblock 0
   server: bind cpu ap, name hh ...
   server: listen ...
   server: try accept ...
   server: Connection accepted -- 1068
   server Complete ret 64, errno 0
   server: Terminating
   server_multi_times: 1
   server: create socket SOCK_STREAM nonblock 0
   server: bind cpu ap, name hh ...
   server: listen ...
   server: try accept ...
   server: Connection accepted -- 1070
   server Complete ret 64, errno 0
   server: Terminating
   server_multi_times: 2
   server: create socket SOCK_STREAM nonblock 0
   server: bind cpu ap, name hh ...
   server: listen ...
   server: try accept ...
   server: Connection accepted -- 1072
   server Complete ret 64, errno 0
   server: Terminating
   
   ap cmd and log
   qemu-armv8a-ap> rpsock_client conn_multi_times block hh droid 3
   client conn_multi_times: 0
   client: create socket SOCK_STREAM nonblock 0
   client: Connecting to droid,hh...
   client: Connected
   client send data, total len 64, BUFHEAD process0060, name:hh
   client: Terminating
   client conn_multi_times: 1
   client: create socket SOCK_STREAM nonblock 0
   client: Connecting to droid,hh...
   client: Connected
   client send data, total len 64, BUFHEAD process0060, name:hh
   client: Terminating
   client conn_multi_times: 2
   client: create socket SOCK_STREAM nonblock 0
   client: Connecting to droid,hh...
   client: Connected
   client send data, total len 64, BUFHEAD process0060, name:hh
   client: Terminating
   
   if we use delay ,client will exit for a while
   qemu-armv8a-ap> rpsock_client conn_multi_times block hh droid 1 delay
   client conn_multi_times: 0
   client: create socket SOCK_STREAM nonblock 0
   client: Connecting to droid,hh...
   client: Connected
   client send data, total len 64, BUFHEAD process0028, name:hh
   client: Terminating
   
   
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to