Click here to Skip to main content
15,908,841 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: VC++ Application Design Pin
Paul Ingles17-Jul-02 5:18
Paul Ingles17-Jul-02 5:18 
GeneralA very basic socket question Pin
Dave_17-Jul-02 3:21
Dave_17-Jul-02 3:21 
GeneralRe: A very basic socket question Pin
Joaquín M López Muñoz17-Jul-02 3:29
Joaquín M López Muñoz17-Jul-02 3:29 
GeneralRe: A very basic socket question Pin
includeh1017-Jul-02 3:39
includeh1017-Jul-02 3:39 
GeneralRe: A very basic socket question Pin
Dave_17-Jul-02 3:51
Dave_17-Jul-02 3:51 
GeneralRe: A very basic socket question Pin
includeh1017-Jul-02 4:05
includeh1017-Jul-02 4:05 
GeneralRe: A very basic socket question Pin
Dave_17-Jul-02 4:11
Dave_17-Jul-02 4:11 
GeneralRe: A very basic socket question Pin
Bubba214617-Jul-02 7:20
Bubba214617-Jul-02 7:20 
Dave_ wrote:
When my listening socket binds to IN_ADDRANY, and I pass port 0 to the bind call, doesn't that mean that I can rcv messages from any port number? This should be true, since this is the part that has been working for quite a while.

No, that's not correct. When you recieve a message you must use, aka bind to, a port number known to both computers ahead of time. The reason is the client (or sending machine) must know which port to send its message to. The server can only listen on one port at a time. Like someone else pointed out, pick some high random number (below 65535 though) so you don't interfere with ports that have official uses ( those < 1024).

It's like a telephone number. When someone calls you they must know your phone number. You don't care what number they're calling from (that's where IN_ADDRANY comes from), but you'll always be to receive calls at your number.

Don't feel estranged.... socket programming is pretty goofy when you first start doing it.
GeneralRe: A very basic socket question Pin
Dave_17-Jul-02 7:37
Dave_17-Jul-02 7:37 
GeneralRe: A very basic socket question Pin
Bubba214617-Jul-02 7:58
Bubba214617-Jul-02 7:58 
GeneralRe: A very basic socket question Pin
Dave_17-Jul-02 8:11
Dave_17-Jul-02 8:11 
GeneralRe: A very basic socket question Pin
Bubba214617-Jul-02 8:27
Bubba214617-Jul-02 8:27 
GeneralRe: A very basic socket question Pin
Dave_17-Jul-02 8:29
Dave_17-Jul-02 8:29 
GeneralPassing a control id Pin
moobob17-Jul-02 3:18
moobob17-Jul-02 3:18 
GeneralRe: Passing a control id Pin
Joaquín M López Muñoz17-Jul-02 3:21
Joaquín M López Muñoz17-Jul-02 3:21 
GeneralRe: Passing a control id Pin
moobob17-Jul-02 3:31
moobob17-Jul-02 3:31 
Questiondbdao.h : what is the matter now? Pin
includeh1017-Jul-02 3:13
includeh1017-Jul-02 3:13 
AnswerRe: dbdao.h : what is the matter now? Pin
Michael P Butler17-Jul-02 3:36
Michael P Butler17-Jul-02 3:36 
GeneralRe: dbdao.h : what is the matter now? Pin
includeh1017-Jul-02 3:46
includeh1017-Jul-02 3:46 
GeneralMemory Managment Pin
c_sisbit17-Jul-02 3:12
c_sisbit17-Jul-02 3:12 
GeneralRe: Memory Managment Pin
Joaquín M López Muñoz17-Jul-02 3:18
Joaquín M López Muñoz17-Jul-02 3:18 
GeneralRe: Memory Managment Pin
includeh1017-Jul-02 3:21
includeh1017-Jul-02 3:21 
GeneralRe: Memory Managment Pin
c_sisbit17-Jul-02 3:41
c_sisbit17-Jul-02 3:41 
GeneralRe: Memory Managment Pin
Joaquín M López Muñoz17-Jul-02 3:46
Joaquín M López Muñoz17-Jul-02 3:46 
GeneralRe: Memory Managment Pin
c_sisbit17-Jul-02 3:47
c_sisbit17-Jul-02 3:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.