SFML community forums

Help => Network => Topic started by: bluevideogame on February 23, 2015, 07:47:40 am

Title: Receiving Data while Typing
Post by: bluevideogame on February 23, 2015, 07:47:40 am
On the command line, how do I write the syntax for receiving data actively, while i am inputting text to the other client.
Because when I start typing in cin it won't receive the data until i press enter...

Thanks
Title: Re: Receiving Data while Typing
Post by: Laurent on February 23, 2015, 07:52:55 am
Either make the standard input non-blocking (OS specific) or use two threads.
Title: Re: Receiving Data while Typing
Post by: bluevideogame on February 23, 2015, 11:24:32 am
hmm, when i pass the socket into the thread function, i get running errors
Title: Re: Receiving Data while Typing
Post by: Glocke on February 24, 2015, 03:34:20 pm
hmm, when i pass the socket into the thread function, i get running errors
A minimal code example and some information about those errors might help to help you :)
Title: Re: Receiving Data while Typing
Post by: Jesper Juhl on February 24, 2015, 09:54:26 pm
You are really *not* giving us anything to work with.
Post your code.
Post your error messages.
Post your description of what happens vs what you expect to happen.
Post info - we can't guess your problem from nothing..!