Suoritettu

Multi-client Chat with File Transfer in Java

I need someone to develop a simple multi-client chat room using Java (require socket programming and threads). There must be at least two classes: [login to view URL] and [login to view URL], possibly a third class to manage which messages should be forwarded to which users ([login to view URL]). Other classes that the developer find necessary could be implemented but those three should be enough. The multiclient chat must have the following functionalities:

- When connecting, the cllient chooses a nickname. If the nickname is already being used, the server should send a message to the client: "ERROR, CHOOSE ANOTHER NICKNAME:" and then the user can keep trying until finding an appropriate nickname. If the nickname is valid, the server answers to this specific client "OK" and also sends a message to all other clients "<NICKNAME> connected to the chat.".

- There are three kinds of messages that can be sent: 1) Text messages. 2) File transfer. 3) Posts. Text messages can be either public or private. Transferring files is always done from one client to another (privately). Posts are always public and can be either text messages or posts with files (so if you want to share a file with everyone in the chat, you do it as a post). The identification of each kind of message is done through a prefix:

--> To send a public message (all clients should receive it), you type: 'MSG GLOBAL <MESSAGE>'. The first three letters identify that this is a text message. the tag "GLOBAL']' specifies that everyone should receive it and after that comes the text.

--> To send a private text message, you type: 'MSG NICKNAME <MESSAGE>'. MSG specifies that this is a text message, NICKNAME is the nickname of the recipient and after that comes the text message...

--> To send a post, you should type 'POST TOPIC <MESSAGE>''. This will be sent to everyone. The tag TOPIC is used because there is a command through which every client can read all posts concerning a specific TOPIC.

--> To read all posts concerning a specific TOPIC, type 'READ TOPIC'.

--> To send a file, the command is:' FILE NICKNAME <filename> <bytes>\n'. FILE specifies that a file will be sent, NICKNAME refers to the recipient of the file transferring, <filename> is the name of the file, which should be in the same folder as the [login to view URL] class, and bytes is an integer with the number of the bytes of the file. The maximum size of the file is 256 bytes.

--> Posting files: to share a file with everyone in the chat you should do it through a post. The command is: 'POST-FILE TOPIC <filename> <bytes>'. Everyone will receive the post immediately but the file could also be retrieved by the same 'READ TOPIC' command explained before.

Server responses:

'OK MSG' - notifies the client that the message was accepted and will be sent.

'ERR MSG' - the message couldn't be sent (recipient doesn't exist, wrong prefix format, etc)

''OK POST' - the server accepted the post

'ERR POST' - the server rejected the post

'OK ALLPOSTS TOPIC <count>\n

POST 1 <message>\n

. . .'

- this is the server answer when you use the READ TOPIC command

'ERR ALLPOSTS TOPIC' - when the READ TOPIC command fails for some reason (topic doesn't exist, for instance)

'OK FILE' - the file was accepted and was sent to the recipient

'ERR FILE' - the file was rejected and was not sent

'TEXT SENDER RECIPIENT(or GLOBAL) <message>' - The user SENDER sent a message to RECIPIENT (or to everyone, which should be specified by the word 'GLOBAL', and then the message is described.

'FILEFROM SENDER RECIPIENT <filename> <bytes>' - The server notifies about the transferring of a file from SENDER to RECIPIENT.

This should be all.

Taidot: Java, Chat Operation, Ohjelmistokehitys

Tietoa asiakkaasta:
( 0 arvostelua ) Covilhã, Portugal

Projektin tunnus: #33789124

Myönnetty käyttäjälle:

devschain

Hi Sir, I can solve Multi-client Chat with File Transfer in Java in 2 hours. I can do this right now I have seen your job requirements and I am sure that I can do your task efficiently in less timeline as I am an exper Lisää

€15 EUR 1 päivässä
(0 Arvostelua)
0.0

5 freelanceria on tarjonnut keskimäärin €26 tähän työhön

hishamyum

Hello sir, I am a Java developer and a network engineer and I am very familiar with sockets programming as well as multi-threading. I can create this application using Java. Please contact me for further details. Best Lisää

€30 EUR 3 päivässä
(7 arvostelua)
3.5
granddevelopers8

MASTERS IN SOFTWARE DEVELOPMENT AND ARCHITECTURE. EXPERT IN JAVASCRIPT, HTML5, CSS C, C++, PYTHON, JAVA AND PHP, BOT MAKING AND SCRIPTING, AUTOMATION. Hi there! Thank you for sharing your project requirement, I have ca Lisää

€30 EUR 1 päivässä
(0 arvostelua)
0.0
anuj4546

Working in MNCs with java and having 8+ yrs experience. Have good knowledge on the java. We catch on sms if more details required.

€28 EUR 15 päivässä
(0 arvostelua)
0.0
Vishal87000

Hello sir, I am a Java developer and a network engineer and I am very familiar with sockets programming as well as multi-threading. I can create this application using Java. Please contact me for further details. Best Lisää

€25 EUR 10 päivässä
(0 arvostelua)
0.0