Code Monkey home page Code Monkey logo

ft_irc's Introduction

FT_IRC

Docs :

Infos :

  • Signaux a gerer (priorite) : CTRL+C, CTRL+D, CTRL+Z
  • Tout les inputs du client DOIVENT finir par "\r\n" pour eviter les EOF inattendu

A suggestion of project roadmap : 1- Begin by establishing a working client/server socket connection, 2- Then build on that : add the signals handling (CTRL+C, CTRL+D, CTRL+Z); 3- Only then begin the client registration system (NICK, USER, PASS), 4- The server commands (PING, OPER, KILL...) and 5- The channel operations commands (JOIN, PART, INVITE, KICK, PRIVMSG, NOTICE...).

server functions :

  • getaddrinfo -> recupere ton adresse pour socket
  • socket -> creer un fd pour communiquer a distance (fd donc doit close)
  • bind -> lie le fd au port local

boucle infini :

  • poll / epoll -> permet d'eviter d'avoir un programme bloquant en regardant si des fd clients sont dispo ou non

for poll_count :

if fd == server :

  • accept -> rajoute les nouveaux fd clients

else :

  • recv -> recoit les messages envoye par les clients

    if recv <= 0 :

    • client disconnect = close le socket

    else :

    • client a envoyer qqch, interpreter

ft_irc's People

Contributors

dailywind00 avatar tuvosyl avatar

Stargazers

 avatar Antoine (Ratsock) avatar

Watchers

Antoine (Ratsock) avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.