summaryrefslogtreecommitdiff
path: root/src/sessionManager.cpp
Commit message (Collapse)AuthorAgeFilesLines
* fix: nullptr(SEGEV) during shutdownlittleblack1112025-04-071-1/+6
|
* refactor: loggingslittleblack1112025-04-071-0/+1
|
* feat: deaflittleblack1112025-04-031-1/+3
| | | | necessary for being deaf during registeration
* fix(nameExists): kill dead thread/sessionlittleblack1112025-03-221-1/+10
| | | | | fixes a bug where if you quit then rejoin with the same name, it still says name exists
* fix: potential crash for weirdly exited clientslittleblack1112025-03-221-2/+2
| | | | | | | | | fixes #9 FIXME: spamming too much will still give ``` terminate called after throwing an instance of 'std::system_error' what(): Resource deadlock avoided ```
* feat(commands): client execute commands (#8)littleblack1112025-03-221-6/+5
| | | | refactor(session): writeChat, unify written chat internal: removed `CChatManager::broadcastMessage`, just use `g_pSessionManager->broadcastChat(msg)`
* fix(sessionManager,kick): only write message if CSession existlittleblack1112025-03-221-3/+2
|
* feat(sessionManager): getSessionslittleblack1112025-03-211-0/+5
|
* clang-formatlittleblack1112025-03-211-2/+2
|
* perf: directly kick instead of calling function in the session(killing it's ↵littleblack1112025-03-211-10/+12
| | | | self?)
* Revert "fix: use shared ptr properly"littleblack1112025-03-201-1/+1
| | | | | This reverts commit 5c007b1581e7c36ce81de299e47c0c9ef51e9950. revert until a solution is developed
* feat: kick client (#6)littleblack1112025-03-201-2/+23
|
* fix: use shared ptr properlylittleblack1112025-03-201-1/+1
| | | | FIXME: for some reason dtors arent called even if use_count() is 0...
* clang-format & clang-tidylittleblack1112025-03-201-4/+3
|
* NFormatter: no more prefix support for socket writelittleblack1112025-03-201-3/+4
| | | | NFormatter: remove CHAT prefix
* sessionManager(broadcast): same order arg list as loglittleblack1112025-03-201-1/+1
|
* fix(sessionManager): don't join() thread on dtor, reset them insteadlittleblack1112025-03-201-3/+5
| | | | | | | also do that in removeSession this fixes when theres multiple clients, the first join() would block second one from getting destoryed
* cleanup: shared ptr .get() and std::move() use caseslittleblack1112025-03-201-1/+1
| | | | fixes a bug where dtor of CSession is not called
* session: get/use IP and port on connectlittleblack1112025-03-201-4/+3
|
* clang-formatlittleblack1112025-03-201-16/+17
|
* signal(session,sessionManager): atexit handlerlittleblack1112025-03-201-0/+8
| | | | sometimes have malloc: Heap corruption detected :/
* fix(registerName): no longer allow same namelittleblack1112025-03-201-8/+21
| | | | | | | | | | the previous behaviour was it wouldn't broadcast the message to the same name debug: more logging, maybe we should disable TRACE by default in the future? WIP: partial impl of signal handling(SIGINT(keyboardinterrupt) etc)
* feat: broadcast message from one client to the rest, making chat actually ↵littleblack1112025-03-201-0/+6
| | | | | | | possible fix(chatServer, CSessionManager): .join sessionThread properly cleanup(server): unused header
* sessionManager: run in a jthread, for prep of inputManagerlittleblack1112025-03-201-1/+1
| | | | refactor(main)!: move main infra to oop chatServer
* fix: session not disconnected properlylittleblack1112025-03-201-7/+21
| | | | perf: use server sockfd directly instead of a dupe of it
* clang-format & clang-tidylittleblack1112025-03-041-12/+9
|
* refactor!: python -> c++littleblack1112025-03-041-0/+29