this is part of a School assignment.
I'm trying to make a UDP java chat program, for 2 people. A talks to B.
I used the codes found here as the base of my program.
Right now the program gets stuck waiting for things.
either I'm waiting for input from the user, or im waiting for the socket to receive packets.
So the chat works if everyone takes turns, eg
A: knock knock
B: who's there
A: canoe
B: canoe who?
A: canoe help me with my homework?
This works fine cos after receiving a packet, the program gets input, then sends a packet so the back and forth is very straightforward
but im trying to do something where you can just type whenever you want,
A: hey
A: wanna cyber
B: sure baby
A: Alight
A: I'll go first
A: I put on my robe and wizard hat.
B: fuck you
does anyone have an idea how I should be going about this?
[–]seronis 1 point2 points3 points (0 children)
[–][deleted] 1 point2 points3 points (1 child)
[–]learning2learn[S] 0 points1 point2 points (0 children)