It means what is happening on the top is there are two different software executed. The answer is the server and client both are software but not hardware. Why Both Server and Client on the Same Computer? Otherwise, do some checking on your development environment or try to run some simple code for instance hello world. If you see the message above, congratulations, you have success with your first step to networking programming. When you execute Socket-cli, I guess you will get the following result: It means, you need to open two terminals to run each of the outputs. Socket-server must be executed first, then execute Socket-client.out and never try to break Socket-server forever loop. Attention here, never mess up with the order of executing Socket-server.out and Socket-client. If((sockfd = socket(AF_INET, SOCK_STREAM, 0)) 0)Īfter debugging both source files, run Socket-server.out, then run Socket-client. Memset(recvBuff, ' 0', sizeof(recvBuff))
0 Comments
Leave a Reply. |