Skip to content

chowdhurySudip/simple-socket-programming

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Simple Socket Programming in C

This projects implements a simple socket program using C language. Here, the server keeps running in a loop, and once the client is run, it sends a message to the server and server sends the message back to the client. I have included two version of the same task.

Getting Started

Simple Socket

A very simple implementation of the socket program. It does not include all the necessary checks; but it works. It is just for getting started.

To run this code -

cd simple_socket/
make
./server (in one terminal)
./client (in another terminal)

Better Socket

A better solution to the socket programming task. It includes all the necessary checks like using getaddrinfo which helps in DNS and service name lookup, making the code IP version agnostic etc.

To run this code -

cd better_socket/
make
./echoserver (in one terminal)
./echoclient (in another terminal)

References

About

A simple socket program in C to transfer messages from client to server and back to client.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published