black055 /
Mango-chat-app
Client-server chat app written by Java (this is a school project)
32/100 healthLoading repository data…
Austinuc / repository
This is a simple interactive, multithreaded Client-Server chat application developed using Java. The application allows multiple clients to connect to a server and send messages to each other in real-time.
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
This is a simple interactive, multithreaded Client-Server chat application developed using Java. The application allows multiple clients to connect to a server and send messages to each other in real-time.
Java 8 or later must be installed on your system.
Once connected to the server, you can start sending messages to other connected clients.
This application is meant for use on a local network. It may not work properly over the internet. If you change the server IP and port number, you will also have to update the corresponding fields in the Client.java file. The project use java.io and java.net package for the socket connection
Run the Server file and run the Client.java file on two or more separate terminals.
This is the message format:
<receiver name> : <your message>Type the recipient name first, followed by colon ':' then your message.Austin: How are you doing today?
You can chat with any other connected client privately.
Selected from shared topics, language and repository description—not editorial ratings.
black055 /
Client-server chat app written by Java (this is a school project)
32/100 healthGeneral Description: In this assignment you will implement a text-based game server and client. The communication between the server and the client(s) will be performed using a simple text based protocol (TBGP), which can potentially support different games; However, your server will only support a single game - Bluffer. The implementation of the server will be based on the Reactor and Thread-Per-Client servers taught in class. You will have to adjust them to support more complex protocols, implement the TBGP, and finally, add support for the Bluffer game in your server, and implement a client. The rest of this document is organized as follows: section 2 presents the TBGP and its specifications, section 3 presents the Bluffer game and its implementation using TBGP, section 4 describes implementation details. 2 Text-based Game Server Protocol (TBGP) Specification 2.1 Establishing a client/server connection Upon connection, the client must specify a nickname using the NICK command. The nickname must be unique and cannot be changed after it is set. The server will respond with a SYSMSG specifying whether the nickname was successfully acquired. 2.2 Game Rooms Games are held in rooms, which can also be used for chat. A user can create and join a room using the JOIN command. A user can only be in one room at any given time. A game can be started using the STARTGAME command. Once started, the room will not accept new users until the game is over. 2.3 Supported Commands The TBGP supports various commands needed in order to create chat rooms and start games in them. There are two types of commands, Server-to-Client and Client-to-Server. The commands are all formatted as follows: <Command> <Optional : Parameters>\n 2.4 Server To Client Commands • Command: ASKTXT Parameter: text - question to ask. 1 Used to ask the client the specified question, expecting a TXTRESP. • Command: ASKCHOICES Parameter: text - question to ask. Used to ask the client the specified question, expecting a SELECTRESP. • Command: SYSMSG Parameter: text. Response to every command the user sends. The format is: SYSMSG <Original Command> <Result> <Optional : Custom Message>\n Where < Result > is one of: ACCEPTED, REJECTED or UNIDENTIFIED. • Command GAMEMSG Parameter: text. Custom messages that are a part of the game being played. • Command: USRMSG Parameter: text. Used to deliver a message sent by another user, in the context of a game-room. 2.5 Client To Server Commands • Command: NICK Parameter: nickname. Requests the specified nickname. • Command: JOIN Parameter: room name. Joins the specified room, creating it if it doesn’t exist. This also causes the user to leave the current room, therefore is impossible while a game is in progress. • Command: MSG Parameter: text to be sent. Sends the specified message to the users current room. • Command: LISTGAMES Lists the games supported by the server. • Command: STARTGAME Parameter: game name. Starts the specified game in the current room. Game is specified using a unique string identifier. • Command: TXTRESP Parameter: text to be sent. Used as a response to ASKTXT command, providing a textual response. • Command: SELECTRESP Parameter: integer - selected response. Used as a response to ASKCHOICES command, providing a numeric selection. 2 • Command: QUIT Closes the connection. 3 The Bluffer Game The Bluffer game is a type of trivia game, with a twist - the players try to fool each other into choosing absurd answers. The game host asks a series of questions, for which the players try to provide answers that seem real. The players are then presented with both the real answer, and the fake answers provided by other players, and have to choose the real one. Players are awarded 10 points for choosing the correct answer, and 5 for each player that chose one of their fake answers. 3.1 Bluffer using TBGP The Bluffer is uniquely identified in the TBGP using the string ”BLUFFER”. Once started, the server will load 3 random question from its database (3.2), and for each question (sequentially): 1. Use ASKTXT to present the question to the user. 2. Once all the users reply (using TXTRESP), their responses must be turned to lowercase and shuffled with the real answer, and then presented with ASKCHOICES. 3. Users reply with SELECTRESP. Once all the users reply, score is awarded (as described in the game description), and is announced along with the correct answer. 4. Move on to the next question. After 3 questions, the scores summary is sent to the users using SYSMSG, and the game is over. 3.2 Questions Database The questions for the Bluffer game are given to you in a JSON file. In it is an array of question objects. question contains two fields: • questionText - String of the question. • realAnswer - String of the real answer. The file must be loaded each time questions are needed, so server restart is not required for editing the database. 4 4.1 • • • Implementation Details General Guidelines The server should be written in Java. The client should be written in C++ with BOOST. Both should be tested on Linux installed at CS computer labs. You must use maven as your build tool. The same coding standards expected in the course and previous assignments are expected here. 3 4.2 Server You will have to implement a single protocol, supporting both the Thread-Per-Client and Reactor servers pre- sented in class. The ServerProtocol interface, as presented in class, is limited to protocols where each user message is responded by a single message, sent to the same user. In order to implement TBGP, and other more complex protocols, the server needs to provide the protocol with means to send messages to any user, at any point in time. In order to achieve this, the ServerProtocol and AsyncServerProtocol presented in class have been refactored to send a ProtocolCallback along with each message. This interface, given in 6.1.1 must be implemented by each server, and a unique instance must be created for each TCP connection. Left to you, are the following 3 tasks: 1. Refactor the Thread-Per-Client server to support the new ServerProtocol. This will require changing the server to use a Tokenizer, and implementing the new ProtocolCallback. 2. Refactor the Reactor server to support the new AsyncServerProtocol. 3. Implement the new AsyncServerProtocol, and support the Bluffer game. Keep in mind, while you’re only required to implement one game, your implementation should support easily adding more games. 4.3 Client The client is multithreaded with one thread for handling the socket and another thread to handle stdin. An echo client is provided, but its a single threaded client. While it is blocking on stdin it does not get messages from the socket. The client should receive the server’s IP and PORT as arguments. You may assume a network disconnection does not happen (like disconnecting the network cable).
usmanyousaaf /
A Multithreaded Client-Server Application in Java is a network-based system where a server program provides services to multiple clients over a network. In this type of system, the client and the server communicate with each other using messages. The multithreading feature allows multiple clients to be served simultaneously by the server,
42/100 healthbbalaji561 /
In this project, you are asked to write a P2P file sharing software similar to BitTorrent. You can complete the project in Java or C/C++. There will be no extra credit for C/C++. BitTorrent is a popular P2P protocol for file distribution. Among its interesting features, you are asked to implement the choking-unchoking mechanism which is one of the most important features of BitTorrent. In the following Protocol Description section, you can read the protocol description, which has been modified a little bit from the original BitTorrent protocol. After reading the protocol description carefully, you must follow the implementation specifics shown in the Implementation Specifics section.
39/100 healthPlamenPenchev /
This is a project I've made for my University course - OOP with Java. It is a simple multithreaded client server program with UI on the client side. A client connects to the server where he can browse an ArrayList of a custom type in order to add more items or read it. Threads fight over the shared resource are managed and synchronized.
27/100 healthMJ-GA /
This repo showcases a Java Swing project development progress . This game is an academic/personal Java Swing project that implements a Multiple Clients/Server model, implements the MVC programming paradigm, uses Swing GUI features and Multithreading effectively.
27/100 health