Skip to content

client class creation #8

Description

@ARaveala

A client class must be created

The client class will manage client data ultimately i do not think there will be much parsing here , if these tasks are split correctly , most tasks will be somewhat simple.

things to put inside a client class ;
*socket_id/fd (although this may not be required if using map as the socket_id can be mapped as the key )

  • ip
  • buffer (for recv() to prevent buffer overwrites by other clients and slowing down processing)
    *nickname
  • full name
  • admin flag/mode flags
  • permissions (flags ?)
  • current channel(s) (especially if we intend to limit client to one channel at a time, are we allowed too do this)
  • an instance of a message class. (better memeory management should a client suddenly disconnect for example)

methods

  • set nickname
  • set fullname
  • set privileges ++
  • get socket_id/fd
  • get ip
  • get permissions?
  • get current channel?
  • send message (after message handeling)
  • receive message (to pass to message handeling) this may consist of reading to buffer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Taskan individual task

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions