net-project's People
net-project's Issues
If the room owner leaves, we should close the room or move the ownership
Read this: https://drive.google.com/file/d/0B5VxwN4mdWxqZmhQLXdIZWZQLXc/view
Disable login to same user from 2 different clients
Put CommandUtils & UserInputCommands in a shared folder. (Change "SocketUtils" to "Utils" and put it there?)
MUDPListener is pretty much EXACTLY like MTCPListener.. make sure its ok
Here's a solution for socket binding problems (code in comment)
Sometimes, a “rough” exit from a program (e.g.,
ctrl-c) does not properly free up a port
Eventually (after a few minutes), the port will be
freed
To reduce the likelihood of this problem, include
the following code:
#include <signal.h>
void cleanExit(){exit(0);}
in socket code:
signal(SIGTERM, cleanExit);
signal(SIGINT, cleanExit);
Create the UDP listener according to Netzer Penisberg's demands
Implement session communication
When creating a session, server should send address & port to the requesting user, so that the user can open a UDP socket (Other user should be listening for connections 24/7 as long as he isn't in a session/room)
ELIAV MENACHI: Opening a session or room will disconnect other open session/ exit from room you are inside. (instead of just telling you that you're busy)
OPENING a room or JOINING it? Isn't it ok to join a room while in session/other room?
Straight from the menachi:
"user can be connected to only to one other user or chat room at a time, calling o or or commands will disconnect other open session."
Bug: When client exists ("x") in a session/room, sometimes it gets segmentation fault. (we wanna quit anyway so idk)
How we gunna fix dat shyt?!
BUG: When opening a UDP socket between 2 clients, the second client can't create it because the address is taken.. GUH
Bug : After disconnection, if you connect again and type 'lcu', the server explodes
ELIAV MENACHI: Login immediately after a user registers..
FUUUUUUU
Change SERVER_SHUTTING_DOWN to 0.. it's the code that it sends when server gets fucked up
Bug: Sometimes when a message is sent, we get ערכים מזובלים in the end, because we don't know the messageLength.
How dafuq we gunna fix dat
BUG: Creating a session always gives an unknown error.
Delete ServerRepliesListener when disconnecting
Make sure all sockets are closed when we exit
Client: Create a thread that listens to changes in clients status
Examples:
- Other user closes the Session in which the user is in.
- Other user closes the Room in which the user is in.
- Server shuts down.
Server should inform the user about these changes in his status.
Disable creating a Session with yourself
Stop playing with yourself!
Bug: Start server, press "x". Sometimes, we get segmentation fault. Also, sometimes we get "New peer accepted: 0.0.0.0"
Tried to fix it by separating the "delete socket" from the "stop thread", but it aint workin :(
Implement data-transfer-lists
Server has to send the client some pretty nasty lists yo.
Example: List all users from client
Go over all my TODOs
Bug: 2 clients in a room. When 1 disconnects, the other client explodes
Send a notification to all clients when server shuts down.
The clients will then be disconnected.
Move everything to TCPProtocol
Validating user&psw when registering? is this necessary? (i deleted it)
bool UserCredentialsManager::signUp(string username, string password)
{
// TODO: Aviad, why is this here?
if (validateUserCredentials(username, password))
{
return false;
}
// Sign up
return writeUserCredentialsToFile(username, password);
}
Add locks EVERYWHERE
BUG: openRoom, closeRoom and joinRoom have no client notifications..
Implement room communication
When a user enters a chat-room, the server sends him a list of all the addresses inside the room.
He then opens a UDP connection for each one.
Also, the server has to update the other users and tell them the user has joined the room. (Users inside rooms listen 24/7 too?)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.