Click here to Skip to main content
15,894,291 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: WM_DEVICECHANGE Problem Pin
goldenrose96-Mar-11 22:23
goldenrose96-Mar-11 22:23 
GeneralRe: WM_DEVICECHANGE Problem Pin
Ozer Karaagac6-Mar-11 22:43
professionalOzer Karaagac6-Mar-11 22:43 
GeneralRe: WM_DEVICECHANGE Problem Pin
goldenrose96-Mar-11 23:43
goldenrose96-Mar-11 23:43 
QuestionSockets and Port number Pin
sawerr5-Mar-11 23:09
sawerr5-Mar-11 23:09 
AnswerRe: Sockets and Port number Pin
Bill SerGio, The Infomercial King6-Mar-11 0:50
Bill SerGio, The Infomercial King6-Mar-11 0:50 
AnswerRe: Sockets and Port number Pin
Andrew Brock6-Mar-11 0:54
Andrew Brock6-Mar-11 0:54 
GeneralRe: Sockets and Port number Pin
sawerr6-Mar-11 1:36
sawerr6-Mar-11 1:36 
GeneralRe: Sockets and Port number Pin
Andrew Brock6-Mar-11 2:01
Andrew Brock6-Mar-11 2:01 
sawerr wrote:
If one application grabs a port no other application can use it.

Application specific would imply that each application could have its own set of ports. I think you meant to say "System Specific".


sawerr wrote:
So, for example,that means one computer mustn't have 2 or more web server that listening port 80. Right?

That is correct. This is called System Specific. 1 per system.

sawerr wrote:
But also a lot of clients can connect same port.

Yes, me and you can both connect to www.google.com on port 80 at the same time. (ignore the fact that we would almost certainly get different servers altogether).
When a server is listening, it has the option of setting the maximum number of sessions.

When you look at some code for starting a server you have something like this:
SOCKET sConnection = socket(AF_UNSPEC, SOCK_STREAM, IPPROTO_TCP); //Create a TCP stream socket with any address type (IPv4, IPv6, ...)
//pAddress = get listening address, usually 0.0.0.0
bind(sConnection, pAddress->ai_addr, pAddress->ai_addrlen);
listen(sConnection, SOMAXCONN);
for (;;) {
    SOCKADDR saClient;
    DWORD nClientAddrLen = sizeof(saClient);
    SOCKET sClient = accept(sConnection, &saClient, &nClientAddrLen);
    CreateThread(); //Create a new thread to handle the new connection
    //Now wait for the next connection in the new loop
}

AnswerRe: Sockets and Port number Pin
Bill SerGio, The Infomercial King6-Mar-11 2:14
Bill SerGio, The Infomercial King6-Mar-11 2:14 
Questionhelp with tcl/tk in C Pin
basel-bh5-Mar-11 20:53
basel-bh5-Mar-11 20:53 
Questioncase statement in DLGPROC [SOLVED] Pin
goldenrose95-Mar-11 16:36
goldenrose95-Mar-11 16:36 
AnswerRe: case statement in DLGPROC Pin
Andrew Brock5-Mar-11 17:55
Andrew Brock5-Mar-11 17:55 
QuestionWM_COMMAND [SOLVED] Pin
goldenrose95-Mar-11 5:08
goldenrose95-Mar-11 5:08 
AnswerRe: WM_COMMAND Pin
Michael Dunn5-Mar-11 6:58
sitebuilderMichael Dunn5-Mar-11 6:58 
AnswerRe: WM_COMMAND Pin
CPallini5-Mar-11 7:37
mveCPallini5-Mar-11 7:37 
QuestionMoving GDI+ objects question Pin
csrss5-Mar-11 2:13
csrss5-Mar-11 2:13 
AnswerRe: Moving GDI+ objects question Pin
Niklas L5-Mar-11 2:42
Niklas L5-Mar-11 2:42 
GeneralRe: Moving GDI+ objects question Pin
csrss5-Mar-11 3:36
csrss5-Mar-11 3:36 
GeneralRe: Moving GDI+ objects question Pin
Niklas L5-Mar-11 5:39
Niklas L5-Mar-11 5:39 
GeneralRe: Moving GDI+ objects question Pin
csrss5-Mar-11 6:16
csrss5-Mar-11 6:16 
AnswerRe: Moving GDI+ objects question Pin
Andrew Brock5-Mar-11 2:42
Andrew Brock5-Mar-11 2:42 
GeneralRe: Moving GDI+ objects question Pin
csrss5-Mar-11 3:04
csrss5-Mar-11 3:04 
GeneralRe: Moving GDI+ objects question Pin
Andrew Brock5-Mar-11 3:09
Andrew Brock5-Mar-11 3:09 
GeneralRe: Moving GDI+ objects question Pin
csrss5-Mar-11 3:16
csrss5-Mar-11 3:16 
Question[solved] class size doesn't seem to be determined correctly [modified] Pin
Albert Holguin4-Mar-11 18:13
professionalAlbert Holguin4-Mar-11 18:13 

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.