I have java tcp socket programming...... In that i need to send a file from client to server .... at the same time i need to chat with that client ...... by what way i can do this ...
sankubha
0
Light Poster
Recommended Answers
Jump to PostYou could open two connections, one for the file transfer and the other for the chat. Each would run in its own thread.
Jump to PostThe same way that you open one!
In the the client just create two Sockets and connect them both to the server. At the server you will get two accepts, and thus two ServerSockets. Now you can use one pair of sockets for the file xfer and the other pair …
Jump to PostYes. Provided your server has enough capacity you can have many many clients (each with one or more connections) all communicating at the same time. Each connection just starts a new Thread on the server.
All 11 Replies
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
sankubha
0
Light Poster
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
sankubha
0
Light Poster
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
sankubha
0
Light Poster
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
sankubha
0
Light Poster
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
sankubha
0
Light Poster
kapildeven89
-1
Light Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.