Skip to content

Latest commit

 

History

History
37 lines (31 loc) · 1.84 KB

README.md

File metadata and controls

37 lines (31 loc) · 1.84 KB

Get_Next_Line_42Network ✅

The Purpose Of This Project Is to Know How File Descriptors And Static Variables Work

> Project Content

Mandatory Part 👨🏻‍💻

In the mandatory part, i read from a file Descriptor and each time i call the function, it returns the next line ✅

The First Step : Read From The Given File With Read (System Call Function) With The Given BUFFER_SIZE.

The Second Step : Check If the Newline Charachter exists in the Reading Number Of Bytes (BUFFER_SIZE).

The Third Step : I Return The Reading Byte Even The Newline Character And Save The Remaining Part Inside The Static Variable

Bonus Part 👨🏻‍💻

In This Part I Made The Function Work With so many Fd At The Same Time ✅

> How To Use The Function

Compilation

Mandatory

gcc $(Your_Files) $(Path/To/gnl/Mandatory/*.c) -D BUFFER_SIZE=42 

Bonus

gcc $(Your_Files) $(Path/To/gnl/Bonus/*.c) -D BUFFER_SIZE=42 



> Project Aim

In This Project I learned how the Static Variables And File Descriptors Work , It Is a good Project 💯.