Click here to Skip to main content
15,891,204 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have a problem with my client/server that I am making. The problem is if Client 1 sends a message Client 2 can receive it, but Client 2 can't send a message to Client 1. However if I restart the program, Client 2 can send a message to Client 1, but then Client 1 can't send a message back to Client 2.

Instructions for the program:

Client 1: Select Bind Then Listen Then Accept

Client 2: Select Connect and Then either Rock or Paper

Client 1: Select Receive Move

So it all depends on who sends the message first. I want it so that both Clients can send and receive without reopening.

Link :https://drive.google.com/file/d/0BwcTtSzHcmv7cDJYV2N6YUJxajg/edit?usp=sharing

Thank You.
Posted
Updated 8-Mar-14 0:18am
v2
Comments
Richard MacCutchan 8-Mar-14 6:22am    
Each client needs two processes, a sender and a receiver. These will then be able to communicate independently with their peer.
WA_coder 8-Mar-14 6:26am    
I have got a sender and a receiver in both clients. I would appreciate it if you could show me where I'm going wrong.
Richard MacCutchan 8-Mar-14 6:31am    
I have no idea where you are going wrong. If you have both processes then you need to use your debugger to find out why one of them is not running. I assume you are running both in separate threads.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900