Click here to Skip to main content
15,905,322 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Just learning STL.. easy question.. Pin
John M. Drescher26-Jun-03 7:14
John M. Drescher26-Jun-03 7:14 
Generalanother quick question.. Pin
RobJones26-Jun-03 8:37
RobJones26-Jun-03 8:37 
GeneralRe: another quick question.. Pin
John M. Drescher26-Jun-03 8:52
John M. Drescher26-Jun-03 8:52 
GeneralRe: another quick question.. Pin
RobJones26-Jun-03 9:14
RobJones26-Jun-03 9:14 
GeneralRe: another quick question.. Pin
CyberDen26-Jun-03 9:36
CyberDen26-Jun-03 9:36 
GeneralOwn client/server and 10053 problem Pin
justin22326-Jun-03 6:31
justin22326-Jun-03 6:31 
GeneralRe: Own client/server and 10053 problem Pin
keegan26-Jun-03 6:35
keegan26-Jun-03 6:35 
GeneralRe: Own client/server and 10053 problem Pin
justin22326-Jun-03 7:21
justin22326-Jun-03 7:21 
Well. I think that the problem is that I do not disconnect correctly.


This is my code for disconnect:

if (m_nState == STATE_CONNECTED)
{
struct linger li = {0, 0}; // Default: SO_DONTLINGER
shutdown(m_sdClient, SD_BOTH);
setsockopt(m_sdClient, SOL_SOCKET, SO_LINGER, (char *)&li, sizeof(li));
}
closesocket(m_sdClient);


then i call acceptex:

if (!AcceptEx(*m_psdListen,
m_sdClient,
&m_wsaInBuf.buf[0],
SERVER_WORK_BUFFER_SIZE-(sizeof(sockaddr_in)+16)*2,
sizeof(sockaddr_in) + 16,
sizeof(sockaddr_in) + 16,
&dwBytesRecvd,
&m_ovIn))
{
if (GetLastError() != ERROR_IO_PENDING)
{
m_nState = STATE_DEAD;
closesocket(m_sdClient);
return;
}
}


Comments please.
GeneralRe: Own client/server and 10053 problem Pin
justin22326-Jun-03 7:27
justin22326-Jun-03 7:27 
GeneralRe: Own client/server and 10053 problem Pin
RobJones26-Jun-03 10:56
RobJones26-Jun-03 10:56 
GeneralVersion number Pin
Anonymous26-Jun-03 5:35
Anonymous26-Jun-03 5:35 
GeneralRe: Version number Pin
basementman26-Jun-03 6:33
basementman26-Jun-03 6:33 
GeneralI need AIR & I'm pulling my hair out over Random doubles within a specified range Pin
johnstonsk26-Jun-03 5:21
johnstonsk26-Jun-03 5:21 
GeneralRe: I need AIR & I'm pulling my hair out over Random doubles within a specified range Pin
Ryan Binns26-Jun-03 5:29
Ryan Binns26-Jun-03 5:29 
GeneralRe: I need AIR & I'm pulling my hair out over Random doubles within a specified range Pin
johnstonsk26-Jun-03 5:42
johnstonsk26-Jun-03 5:42 
GeneralRe: I need AIR & I'm pulling my hair out over Random doubles within a specified range Pin
Ian Darling26-Jun-03 6:22
Ian Darling26-Jun-03 6:22 
GeneralRe: I need AIR & I'm pulling my hair out over Random doubles within a specified range Pin
David Crow26-Jun-03 7:20
David Crow26-Jun-03 7:20 
GeneralRe: I need AIR & I'm pulling my hair out over Random doubles within a specified range Pin
Ryan Binns26-Jun-03 14:55
Ryan Binns26-Jun-03 14:55 
GeneralRe: I need AIR & I'm pulling my hair out over Random doubles within a specified range Pin
johnstonsk27-Jun-03 3:56
johnstonsk27-Jun-03 3:56 
GeneralRe: I need AIR & I'm pulling my hair out over Random doubles within a specified range Pin
Ryan Binns27-Jun-03 3:59
Ryan Binns27-Jun-03 3:59 
GeneralRe: I need AIR & I'm pulling my hair out over Random doubles within a specified range Pin
Dominik Reichl26-Jun-03 7:50
Dominik Reichl26-Jun-03 7:50 
GeneralStandard Error and Warning Images Pin
Steve Thresher26-Jun-03 3:31
Steve Thresher26-Jun-03 3:31 
GeneralRe: Standard Error and Warning Images Pin
basementman26-Jun-03 3:54
basementman26-Jun-03 3:54 
GeneralRe: Standard Error and Warning Images Pin
Steve Thresher26-Jun-03 4:35
Steve Thresher26-Jun-03 4:35 
GeneralRe: Standard Error and Warning Images Pin
Ryan Binns26-Jun-03 5:19
Ryan Binns26-Jun-03 5:19 

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.