I am currently writing a server based IM type of a program for my java class. The problem is that the client (which runs in a terminal) blocks all incoming traffic as it waits for you to type a message. My question is how do I get around this? I tried creating a tread whose only purpose was to listen on the incoming port and print the message to the screen. But that didnt work. So I am kind of running out of ideas here. Any ideas on how to make this work (I thought of possibly doing a key combo like ctrl+t and have it prompt you for the message, and all the rest of the time listening, but I cant find anywhere that has it for the terminal. they are all for gui stuff)
Terminal, blocking text input... a way around?
Collapse
X
-
Tags: None
-
Originally posted by linkstermanI am currently writing a server based IM type of a program for my java class. The problem is that the client (which runs in a terminal) blocks all incoming traffic as it waits for you to type a message. My question is how do I get around this? I tried creating a tread whose only purpose was to listen on the incoming port and print the message to the screen. But that didnt work. So I am kind of running out of ideas here. Any ideas on how to make this work (I thought of possibly doing a key combo like ctrl+t and have it prompt you for the message, and all the rest of the time listening, but I cant find anywhere that has it for the terminal. they are all for gui stuff)
Comment