trouble with simple tcp server using socket interface

31 views
Skip to first unread message

Mark Rages

unread,
Sep 27, 2016, 5:28:43 AM9/27/16
to esp-open-rtos mailing list
Hi everyone,

I'm new to this SDK and I'm trying to make a simple socket server.

I've attached the complete program that I'm using for testing.

Once it has accept()ed a connecction, it immediately send()s "Hello World" and waits for disconnection.

But it doesn't always work.

I am testing it like this:

$ nc -d 10.30.7.8 2000

then control-C to end the connection.

The first three times I do this, I see "Hello World".

The fourth time through eighth time I do this, nc returns immediately and I don't see anything,

The ninth time, nc hangs waiting for ^C.  It doesn't print anything.

This sequence repeats like this after power up.

What am I doing wrong? How should I debug this?

Regards,
Mark
markrages@gmail
sock_serv.c
Reply all
Reply to author
Forward
0 new messages