no problem
Printable View
no problem
Did you even read Beej's guide? Somehow I doubt it.
READ ME
You don't bind to a socket with the client, because all you do is go ask for a connection. The server has already bound to a port and sits there listening on it for an incoming connect request.
People that come here for help but don't even pay attention when they're given one of the best resources out there really annoy me. I mean really, why even ask if you don't care enough to follow the advice you were given?
"Ok, I'm going to ask for help, but I'm going to pretty much ignore what you all suggest until I hear an answer I like enough to follow."
Quzah.
Um, I actually did read most of it, though I didn't read everything that well. I also skippet the last parts (part > 5), and mostly used it as a reference to the functions. I don't like people insinuating that I didn't do something I did do. I already said I wasn't good at network programming! If people think I didn't read it at all, and don't want to help; that's ok, its a forum and no-one is forced to reply to someone's thread!
quzah, i don't agree with you on the bind... you can bind a client to a local port, it's just simply not done, because there is no real need, but it's a posibility.Quote:
Originally Posted by quzah
also why attack someone just because they don't understand, since this is new to them?!?
Hm... perhaps because the link I showed gave an example of both a client and a server? That, had they actually looked at it, they would have seen that the client did not in fact call bind. Thus, as stated, it was apparent that they didn't in fact read the what they were given.
Like I said, why bother when people just ignore what you've been telling them has the answers?
"Here's the answer."
"Yeah, I only want to half-ass read that. But I want to learn. Honest!"
Quzah.
relax dude... breath... in and out... :D
Trust me, it's quite easy to be completely relaxed and still think some one is an idiot. But now we're far off track.
Quzah.
FYI, section 4.3 of Beej's tutorial (talking about connect(), with sample code) states:Quote:
Originally Posted by kristy
Quote:
Also, notice that we didn't call bind(). Basically, we don't care about our local port number; we only care where we're going (the remote port). The kernel will choose a local port for us, and the site we connect to will automatically get this information from us. No worries.