Skip to content

Ewenwan/Unix-Socket-Example

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Unix-Socket-Example

Unix Socket Programming

  • files:

1.server.c: TCP server (contain port number and hostname)

2.client.c: Client that sends request to server

3.query.txt: data on the server

  • compilation:

gcc server.c -o server

gcc client.c -o client

  • execution:

./server on a window

./client on the other window

  • example:

./client

What’ s your requirement? 1.DNS 2.QUERY 3.QUIT : 1

Input URL address : www.google.com

address get from domain name : 173.194.72.106

What’ s your requirement? 1.DNS 2.QUERY 3.QUIT : 2

Input student ID : 99123

Email get from server : …

About

socket example using C

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 100.0%