smallbomb / -Linux-C-sample-socket

C Socket Programming for Linux with a Server and Client Example Code

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

-Linux-C-sample-socket

C Socket Programming for Linux with a Server and Client Example Code

1.Use setsockopt() to solve timeout problem.

2.Use signal() and waitpid() to solve zombie process beacuse of using fork().

Server:

Calculates the number to the power of two by the client sent

Client:

Send a number to server and receive a result from server

Command line

First step

~$ make clean ; make

Second step

~$ ./serversocket

From other terminal

~$ ./clientsocket 'num'

NOTE:

The 'num' have to decimal.

About

C Socket Programming for Linux with a Server and Client Example Code

License:MIT License


Languages

Language:C 91.9%Language:Makefile 8.1%