forked from scott/threaded_network_chat
Compare commits
3 Commits
7c1aeafab7
...
refac-work
| Author | SHA1 | Date | |
|---|---|---|---|
| eb0f004954 | |||
| 9c75a62140 | |||
| d3c5518db1 |
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
client.txt
|
||||||
|
server.txt
|
||||||
|
*.o
|
||||||
|
ct
|
||||||
27
README.md
27
README.md
@@ -1,9 +1,12 @@
|
|||||||
# threaded network chat refactor
|
# threaded network chat refactor
|
||||||
|
|
||||||
The functions have been split into semantically appropriate files but almost nothing whatsoever
|
I have split functions semantically into different files and tied all global variables together in
|
||||||
has been modified.
|
`public.h` so they work without modifications.
|
||||||
|
|
||||||
It APPEARS that this version actually works. I tested it a little.
|
Additional changes:
|
||||||
|
- Fixed the dreaded bug where you have to launch the program twice to make it work
|
||||||
|
- Adjusted the ncurses stuff a bit so it doesn't look as janky
|
||||||
|
- Changed server/client mode (`mode` variable) from an integer to an enum (still works as an integer)
|
||||||
|
|
||||||
## What now?
|
## What now?
|
||||||
|
|
||||||
@@ -21,15 +24,19 @@ and inconsistent. If you set up your editor correctly, it will take care of most
|
|||||||
- Distribute appropriate code to people with those responsibilities
|
- Distribute appropriate code to people with those responsibilities
|
||||||
- Have everyone upload their respective code to their sections of the gitlab
|
- Have everyone upload their respective code to their sections of the gitlab
|
||||||
|
|
||||||
## Code
|
|
||||||
|
|
||||||
Everything is in [src/](src).
|
|
||||||
A mostly untouched copy of [Scott's original code](https://git.therats.win/scott/threaded_network_chat) is also in [old/](old).
|
|
||||||
A reformatted version of that code is also in [modified-example.cc](modified-example.cc) but it can be ignored.
|
|
||||||
|
|
||||||
## Build
|
## Build
|
||||||
|
|
||||||
```
|
```
|
||||||
cd src/
|
|
||||||
make
|
make
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
```
|
||||||
|
./ct # run as server
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
./ct client # run as client
|
||||||
|
```
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user