(Socket operation on non socket) error while trying to receive data on a TCP server

You never initialize sockfd_cli. Odds are, it’s zero, and that’s your standard input terminal and not a socket. You need to store the return value from accept in sockfd_cli.

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top