Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

wut

Name: wut 2014-04-01 18:43

dearest /prog/

I am trying to write an instant messaging program in C. I have come to a brick wall, however. how do I handle these three things concurrently: refreshing the display (in my case, a basic ncurses window), accepting input (stdin), writing & reading from the socket?

the main issue is that input blocks anything else from happening. is it possible to pass the file descriptor for stdin to another thread, then for that thread to update the char* array for the input ncurses window, then that is finally updated by the main thread? then, after the input is 'ready', it is written to the socket.

meanwhile, the read thread would accept and write data to a char** array, holding the data for the recent messages (which is then updated by the main thread thru ncurses windows).

am i thinking in any logical sense? how would you wizards accomplish this? also, to reiterate my question, could I pass the stdin file descriptor to another thread which then processes it?

thx

Name: Anonymous 2014-04-01 18:46

Programming is for faggots.

Name: Anonymous 2014-04-01 18:53

Just look around and tell me you see a thread that isn't full of shitposting.
I wish there was somewhere to go.

Name: Anonymous 2014-04-01 19:14

There is no such thing as rape. Any female who leaves her rightful place in the house and the kitchen is fucking begging for cock in her holes. If she gets the cock she so badly is asking for, it's not fucking rape, it's a damn slut getting what she fucking deserves.

Males still rule this fucking world. In most of the world, a fucking bitch can get killed for looking at a man straight in the eye. In America and Europe, every day dumb sluts get their holes penetrated without their so-called consent, which isn't rape, just them getting the fucking dick they deserve up their asses.

Sexual abuse is on the rise, spousal abuse is on the rise and more bitches die every year. Fucking cunts. I am so glad I was born a man. I am so glad there is a bunch of retarded sluts jumping trough hoops just to get my cock.

Haha, females are so fucking sad. We treat you bitches like shit, and you still spend time, money and effort on trying to look good for us. Way to be a good slave, whores. Now keep acting like sluts and sucking our cocks. And if you change your mind after you leave the house, too fucking bad, you're getting your holes fucked and there isn't shit you can do about it because that's your only fucking purpose in life.

Name: Anonymous 2014-04-01 19:29

HAX MY ANUS

Name: Anonymous 2014-04-01 19:31

i don't mind wading through these responses. i know they are loving, at their heart. these souls have messages they wish to give us all.

so i will wait through all the lovely messages for help :^)

Don't change these.
Name: Email:
Entire Thread Thread List