Skip to content

handle setup for server outside of loop #1

Description

@ARaveala

Initial set up for the server are things that must be or a better to be prepared before the main server loop begins .
The program expects 2 arguments before running ./ircserv .
port needs to be validated .
Password must be validated.
This means also structuring the main with argv.

  • We may want a default setting for easier time testing that allows arguments to be empty and has presetup values.

signal handling , setting up cntrl d, cntrl c ? , at the start will ensure that they are infact handled from the get go.

configuration values eg max clients , timeouts and such should be prepared, values can be adjusted later easily through a header file.

server set up.

  • set up any storage now, this may include
  • fill server class information and launch server/instantiate and initialize .
    * create, bind, start, listen socket
    * register server socket with epoll()
    * prepare client map storage (empty to start)
    * create main server loop (minimum for testing and understanding progression of code)

log systems, we will want to be prepared for reading at the very least the client logs messages being sent back and forth, they can be sent to terminal and/or loged into a text file , having a log file will allow us to use terminals search methods to pick out specific messages .

setting up epoll() . epoll() will give us an easier management system as the server loop runs , but it may require a little bit of extra work for set up, since the code will be somewhat interconnected , epolls() management system will make it easier for us.

These are what i consider bare minimum before the server loop is running. things like client class and channel classes can be created after we have something to test against .

Metadata

Metadata

Labels

stage overviewa general overview of scope (will be split)

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions