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

WinSock w/ pthreads, C++

Name: Anonymous 2008-10-13 5:49

I'm testing a concept so excuse the messy code, it's my first time really using pthreads at all. Running into a bit of a problem; it handles the first client that connects just fine, but none afterward. At first I thought it had something to do with my accept socket, because if I closed the accept socket after setting it to the socket in my thread's object, it would close the connection, so I made an array of accept sockets. Still not working.

In short, I don't want bitching about my coding style, etcetera, as I just threw this together to see how it works. It's most certainly not going to be used in anything; it's just a learning tool of sorts. If anyone can find where and why it's not working as I intend it to, I'd greatly appreciate an explanation.

Code: http://pastebin.com/m47bff01e

Thanks.

Name: Anonymous 2008-10-25 18:44

>>37
>>2 already pointed out that the problem was that your using multiple accept sockets, so I wouldn't call it irrelevant.

Name: Anonymous 2008-10-25 22:22

>>41
Except that wasn't the problem.

The problem was trying to rebind a listening socket.

So yes, I'd call that irrelevant.

Name: Anonymous 2008-10-26 1:57

I am proud to have contributed one or more irrelevant posts to this wonderful thread.

I am >>11 and proud of it.

Also, OP can choke on my nutsack for being a whiny douche.

Name: Anonymous 2008-10-26 7:53

>>42
And you were rebinding a listening socket because you were using multiple accept sockets. You just didn't understand >>2's answer until >>30 pointed out why using multiple accept sockets wouldn't work.

Name: Anonymous 2008-10-26 14:16

>>44
No, I was not rebinding a listening socket because I was using multiple accept sockets. I was rebinding a listening socket because it was inside a loop that it should have been outside of. If I put multiple accept sockets back in, it works fine; it's just redundant and useless.

>>43
Whiny douche? Why, because I, oh I don't know, like it when people actually mention something useful or relevant in reference to my questions? Troll harder, >>43.

Also, in reference to >>11 ... it's easily readable. Very easily. Unless you're dyslexic or something.

Name: Bro 2008-10-26 14:19

Bro, boring thread, bro.

Name: Anonymous 2008-10-26 14:35

>>45
If you want useful and relevant answers try asking your questions on stackoverflow.com instead of /prog/ next time.

Name: Anonymous 2008-10-26 14:36

OP here, I can't program and should give up.

Name: Bro 2008-10-26 15:10

Bro, OP here, bro.

Name: Anonymous 2008-10-26 22:47

>>45
SAME PERSON AND YOU HAVE BEEN TROLLED CONSTANTLY

Whiny nutfucker, go to /pr/ if you want real answers. We masturbate all over our copies of SICP while currying Haskell nomads with SUAVE LISP TOADS here in /prog/.

Quit getting butthurt over the internet, it makes you look like you don't know what's going on.

Name: Anonymous 2008-10-26 23:30

>>50
I think you need to work on your meme lore, bro.

Name: Anonymous 2008-10-26 23:54

>>51
Totally, bro. (no homo)

Name: Anonymous 2008-10-27 12:33

>>50
Sage for this post.

Name: Bro 2008-10-27 13:25

Bro, Age, bro.

Name: Anonymous 2009-08-16 17:24


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