An open API service indexing awesome lists of open source software.

https://github.com/thevickypedia/socket_programming_tcp

Simple TCP connection using C program
https://github.com/thevickypedia/socket_programming_tcp

socket-programming tcp-connection

Last synced: 9 months ago
JSON representation

Simple TCP connection using C program

Awesome Lists containing this project

README

          

# Socket Programming
Simple TCP connection between server and client

This is a simple tcp connection establishment between server and client using socket programming in C

Suitable for Linux command line

Steps:
* Place the server and client files in different folders
* Run gcc server.c -o server to create executable server file
* Run gcc client.c -o client to create executable client file
* Initiate server using ./server
* Initiate client using ./client

Connection established!

Note: Both ./server and ./client can run without arguments in case of [localhost](https://stackoverflow.com/questions/7382602/what-is-the-difference-between-127-0-0-1-and-localhost) (127.0.0.1) and the port number is also hard coded.