Click here to Skip to main content
16,008,719 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Checksum Pin
Michael Dunn30-Jun-03 19:52
sitebuilderMichael Dunn30-Jun-03 19:52 
GeneralRe: Checksum Pin
Toni7830-Jun-03 20:04
Toni7830-Jun-03 20:04 
GeneralRe: Checksum Pin
kakan30-Jun-03 20:03
professionalkakan30-Jun-03 20:03 
GeneralRe: Checksum Pin
Toni7830-Jun-03 20:15
Toni7830-Jun-03 20:15 
GeneralRe: Checksum Pin
kakan30-Jun-03 20:19
professionalkakan30-Jun-03 20:19 
GeneralWin2K : AcceptEx() & getpeername() Pin
cmk30-Jun-03 17:52
cmk30-Jun-03 17:52 
GeneralRe: Win2K : AcceptEx() & getpeername() Pin
Ryan Binns30-Jun-03 18:52
Ryan Binns30-Jun-03 18:52 
GeneralRe: Win2K : AcceptEx() & getpeername() Pin
cmk30-Jun-03 21:06
cmk30-Jun-03 21:06 
>>Does it work if you don't set SO_UPDATE_ACCEPT_CONTEXT?

No, if i don't set SO_UPDATE_ACCEPT_CONTEXT then even getsockname() won't work.
I think they mention XP because they finally got around to fixing it there. Smile | :)
The problem is only with AcceptEx(), not accept() or WSAAccept().

Part of the problem is that accept() and WSAAccept() are sync calls that block until a connection is available and then they create the socket and establish the connection in one shot.

AcceptEx() is async and requires the socket to be created, then an AcceptEx() request posted. When a connection is available the winsock lib (?) attaches the connection to the pre-created socket but does not set any other state information. Setting SO_UPDATE_ACCEPT_CONTEXT copies the state info from the listening socket to the accepted socket (or is supposed to anyways).

It looks like it doesn't do a complete job in Win2K, so i was hoping to find a low-level way of setting it myself, or find another way of obtaining the peer address from the handle (there has to be a way as netstat shows both sides of the connection).


...cmk
GeneralRe: Win2K : AcceptEx() & getpeername() Pin
Ryan Binns30-Jun-03 22:14
Ryan Binns30-Jun-03 22:14 
GeneralRe: Win2K : AcceptEx() & getpeername() Pin
cmk1-Jul-03 8:41
cmk1-Jul-03 8:41 
GeneralRe: Win2K : AcceptEx() & getpeername() Pin
Ryan Binns1-Jul-03 15:39
Ryan Binns1-Jul-03 15:39 
GeneralRe: Win2K : AcceptEx() & getpeername() Pin
cmk1-Jul-03 17:08
cmk1-Jul-03 17:08 
Questionhow to get the current window system language name? Pin
benben30-Jun-03 17:35
benben30-Jun-03 17:35 
AnswerRe: how to get the current window system language name? Pin
Toni7830-Jun-03 18:14
Toni7830-Jun-03 18:14 
AnswerRe: how to get the current window system language name? Pin
Ryan Binns30-Jun-03 18:58
Ryan Binns30-Jun-03 18:58 
GeneralRe: how to get the current window system language name? Pin
Toni7830-Jun-03 19:12
Toni7830-Jun-03 19:12 
GeneralRe: how to get the current window system language name? Pin
Rage30-Jun-03 20:51
professionalRage30-Jun-03 20:51 
GeneralRe: how to get the current window system language name? Pin
Ryan Binns30-Jun-03 22:03
Ryan Binns30-Jun-03 22:03 
GeneralThanks Pin
benben30-Jun-03 20:39
benben30-Jun-03 20:39 
GeneralRe: Thanks Pin
Ryan Binns30-Jun-03 22:04
Ryan Binns30-Jun-03 22:04 
GeneralCListCtrl can we get a handle to the icon associated to the text Pin
FASTian30-Jun-03 17:30
FASTian30-Jun-03 17:30 
GeneralRe: CListCtrl can we get a handle to the icon associated to the text Pin
Ryan Binns30-Jun-03 19:07
Ryan Binns30-Jun-03 19:07 
QuestionHow to disable the "Esc" key Pin
FlyingDancer30-Jun-03 17:15
FlyingDancer30-Jun-03 17:15 
AnswerRe: How to disable the "Esc" key Pin
Toni7830-Jun-03 17:23
Toni7830-Jun-03 17:23 
GeneralRe: How to disable the "Esc" key Pin
FlyingDancer30-Jun-03 18:15
FlyingDancer30-Jun-03 18:15 

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.