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

C / C++ / MFC

 
AnswerRe: BCDebug Pin
Michael Dunn25-Jun-06 11:59
sitebuilderMichael Dunn25-Jun-06 11:59 
GeneralRe: BCDebug Pin
Ray Cassick25-Jun-06 14:12
Ray Cassick25-Jun-06 14:12 
Questionsimulate the keyboad values Pin
Fabian Tang25-Jun-06 8:17
Fabian Tang25-Jun-06 8:17 
Questiondeleting sections from ini Pin
fury 8425-Jun-06 7:02
fury 8425-Jun-06 7:02 
AnswerRe: deleting sections from ini Pin
Joe Woodbury25-Jun-06 8:16
professionalJoe Woodbury25-Jun-06 8:16 
GeneralRe: deleting sections from ini Pin
fury 8425-Jun-06 8:20
fury 8425-Jun-06 8:20 
QuestionCheck for privileges Pin
xuanvulh25-Jun-06 4:19
xuanvulh25-Jun-06 4:19 
Questionsocket question [modified] Pin
mohanrajh25-Jun-06 2:45
mohanrajh25-Jun-06 2:45 
Hi,
Could please someone help me with this basic question on socket, here is a rough syntax for creating multiclient connection. Each client connection runs on new thread...
<code>
CreateConnection()
{
SOCKET s = socket(...) //create sock stream socket

bind(..) //bind to port

listen(s, somaxconn) //listen max connection

while(1)
{
DWORD val = WSAWaitForMultipleEvents //listen for network event

if (val == WSA_WAIT_EVENT_0 ) //signaled state, so try to accept connection
{
if(accept(s,..) == SOCKET_ERROR)
{
//socket error due to queue full
//What to do here?
//Do i close the socket(s) and exist the appln? OR
//break from here & start listening for new connection event
}else
CreateThread() //create new thread
}
}
}
</code>

Thanks guys

Mohan

-- modified at 8:50 Sunday 25th June, 2006
AnswerRe: socket question Pin
Jun Du25-Jun-06 4:24
Jun Du25-Jun-06 4:24 
GeneralRe: socket question Pin
mohanrajh25-Jun-06 17:24
mohanrajh25-Jun-06 17:24 
GeneralRe: socket question Pin
Jun Du26-Jun-06 4:05
Jun Du26-Jun-06 4:05 
GeneralRe: socket question Pin
Jun Du26-Jun-06 4:44
Jun Du26-Jun-06 4:44 
QuestionChange a Unicode project to MBCS using VS2005 Pin
cv_k3n24-Jun-06 23:44
cv_k3n24-Jun-06 23:44 
AnswerRe: Change a Unicode project to MBCS using VS2005 Pin
Justin Tay25-Jun-06 0:05
Justin Tay25-Jun-06 0:05 
GeneralRe: Change a Unicode project to MBCS using VS2005 Pin
cv_k3n25-Jun-06 0:14
cv_k3n25-Jun-06 0:14 
GeneralRe: Change a Unicode project to MBCS using VS2005 [modified] Pin
Justin Tay25-Jun-06 0:37
Justin Tay25-Jun-06 0:37 
GeneralRe: Change a Unicode project to MBCS using VS2005 Pin
cv_k3n25-Jun-06 0:54
cv_k3n25-Jun-06 0:54 
GeneralRe: Change a Unicode project to MBCS using VS2005 Pin
cv_k3n26-Jun-06 10:28
cv_k3n26-Jun-06 10:28 
GeneralRe: Change a Unicode project to MBCS using VS2005 Pin
Justin Tay27-Jun-06 5:06
Justin Tay27-Jun-06 5:06 
Questioncann't add a project to the current workspace Pin
old_dustman24-Jun-06 22:48
old_dustman24-Jun-06 22:48 
AnswerRe: cann't add a project to the current workspace Pin
old_dustman24-Jun-06 23:18
old_dustman24-Jun-06 23:18 
GeneralRe: cann't add a project to the current workspace Pin
Jun Du26-Jun-06 4:51
Jun Du26-Jun-06 4:51 
QuestionHow to change the icon i listctrl? Pin
xuwenq8824-Jun-06 22:11
xuwenq8824-Jun-06 22:11 
AnswerRe: How to change the icon i listctrl? Pin
Hamid_RT25-Jun-06 3:06
Hamid_RT25-Jun-06 3:06 
GeneralRe: How to change the icon i listctrl? Pin
xuwenq8825-Jun-06 4:27
xuwenq8825-Jun-06 4:27 

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.