For Programmers: Free Programming Magazines  


Home > Archive > MSDN > October 2005 > How to find and adjust the Window size for TCPIP ???









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author How to find and adjust the Window size for TCPIP ???
Shahul

2005-10-18, 7:55 am

Dears,

In my win32 console application , using the TCPIP sockets, facing some
serious issues.
My local end sends Messages continuously and flooded the remote end, at this
time send() got blocked and waits for long time and also Remote end has
enough buffer to receive the data continuously and awaiting for new
messages.

Once I have closed the remote end, send() at the local end returns
WSAECONNRESET (10054). It seems to be the Internal buffer at the local end
got filled completely, hence the send() got blocked. Is it right??? or any
other case that makes this blocking.

If the above reason is correct , how could I find and adjust the TCPIP
window size in windows2000 and above versions.
I have looked into the Registry, but not able to find out the correct
location.

Could you please guide me?

Awaiting for your earliest reply.

Thanks and regards,
shaham


Mark [exmsft]

2005-10-18, 6:57 pm

"Shahul" <shahul1@chellasoft.com> wrote in message
news:%231o4jB90FHA.1252@TK2MSFTNGP09.phx.gbl...

<snip>

>
> If the above reason is correct , how could I find and adjust the TCPIP
> window size in windows2000 and above versions.
> I have looked into the Registry, but not able to find out the correct
> location.
>
> Could you please guide me?
>


please see:
http://www.microsoft.com/technet/it...vg/tcpip2k.mspx

it should have the information you are looking for.

thanks,
mark


Alexander Nickolov

2005-10-18, 6:57 pm

I just want to point out that extending the TCP send buffer is
not going to solve your problem, only mitigate it a bit. The
problem is at your receiving end not reading the data for
some reason (most likely due to programmatic bug).

--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD
email: agnickolov@mvps.org
MVP VC FAQ: http://www.mvps.org/vcfaq
=====================================

"Shahul" <shahul1@chellasoft.com> wrote in message
news:%231o4jB90FHA.1252@TK2MSFTNGP09.phx.gbl...
> Dears,
>
> In my win32 console application , using the TCPIP sockets, facing some
> serious issues.
> My local end sends Messages continuously and flooded the remote end, at
> this
> time send() got blocked and waits for long time and also Remote end has
> enough buffer to receive the data continuously and awaiting for new
> messages.
>
> Once I have closed the remote end, send() at the local end returns
> WSAECONNRESET (10054). It seems to be the Internal buffer at the local end
> got filled completely, hence the send() got blocked. Is it right??? or any
> other case that makes this blocking.
>
> If the above reason is correct , how could I find and adjust the TCPIP
> window size in windows2000 and above versions.
> I have looked into the Registry, but not able to find out the correct
> location.
>
> Could you please guide me?
>
> Awaiting for your earliest reply.
>
> Thanks and regards,
> shaham
>
>



Arkady Frenkel

2005-10-18, 6:57 pm

Exactly , that block waiting for ack from peer one and you have to check ,
using sniffer and debugging app , what happen there.
Obvioulsy bracking connection you push local stack to receive WSAECONNRESET
Arkady

"Alexander Nickolov" <agnickolov@mvps.org> wrote in message
news:OHFiZEA1FHA.3756@tk2msftngp13.phx.gbl...
>I just want to point out that extending the TCP send buffer is
> not going to solve your problem, only mitigate it a bit. The
> problem is at your receiving end not reading the data for
> some reason (most likely due to programmatic bug).
>
> --
> =====================================
> Alexander Nickolov
> Microsoft MVP [VC], MCSD
> email: agnickolov@mvps.org
> MVP VC FAQ: http://www.mvps.org/vcfaq
> =====================================
>
> "Shahul" <shahul1@chellasoft.com> wrote in message
> news:%231o4jB90FHA.1252@TK2MSFTNGP09.phx.gbl...
>
>



Shahul

2005-10-19, 7:55 am

hello Frenkel,

Basically , send() is not a blocking command, then why it gets blocked. I
have debugged my application using VC++ debug, found that receiving end
awaiting for receiving (using select() ) the message.

Could you please tell me in detail, how to resolve this problem.

Regards,
shaham.



"Arkady Frenkel" <arkadyf@hotmailxdotx.com> wrote in message
news:e869qHC1FHA.2880@TK2MSFTNGP12.phx.gbl...
> Exactly , that block waiting for ack from peer one and you have to check ,
> using sniffer and debugging app , what happen there.
> Obvioulsy bracking connection you push local stack to receive

WSAECONNRESET
> Arkady
>
> "Alexander Nickolov" <agnickolov@mvps.org> wrote in message
> news:OHFiZEA1FHA.3756@tk2msftngp13.phx.gbl...
>
>



Arkady Frenkel

2005-10-19, 7:55 am

If op is blocking or non-blocking depends upon socket and not operation
itself , you set it ( socket ) to non-blocked ( by default it's blocked ) by
ioctlsocket() ( FIONBIO command )
Arkady

"Shahul" <shahul1@chellasoft.com> wrote in message
news:uL$SmmJ1FHA.984@TK2MSFTNGP12.phx.gbl...
> hello Frenkel,
>
> Basically , send() is not a blocking command, then why it gets blocked. I
> have debugged my application using VC++ debug, found that receiving end
> awaiting for receiving (using select() ) the message.
>
> Could you please tell me in detail, how to resolve this problem.
>
> Regards,
> shaham.
>
>
>
> "Arkady Frenkel" <arkadyf@hotmailxdotx.com> wrote in message
> news:e869qHC1FHA.2880@TK2MSFTNGP12.phx.gbl...
> WSAECONNRESET
>
>



Shahul

2005-10-20, 4:00 am

hello Frenkel,

By making the socket as non-blocking will solve my problem. Also I would
like to change the value of "GlobalMaxTCPwindowsize" in TCPIP registry
parameters as 1073741823, is it help to solve my issue.

Could you please tell me what are the divantages of nonblocking socket
(Currently I am using blocking socket, as you told by default). Using
select() to get the Socket Trigger for nonblocking socket is nice idea or
not?

Thanks,
shaham.

"Arkady Frenkel" <arkadyf@hotmailxdotx.com> wrote in message
news:OcPwRtJ1FHA.3124@TK2MSFTNGP12.phx.gbl...
> If op is blocking or non-blocking depends upon socket and not operation
> itself , you set it ( socket ) to non-blocked ( by default it's blocked )

by
> ioctlsocket() ( FIONBIO command )
> Arkady
>
> "Shahul" <shahul1@chellasoft.com> wrote in message
> news:uL$SmmJ1FHA.984@TK2MSFTNGP12.phx.gbl...
I[color=darkred]
check[color=darkred]
local[color=darkred]
or[color=darkred]
TCPIP[color=darkred]
correct[color=darkred]
>
>



Arkady Frenkel

2005-10-20, 4:00 am

IMHO the answer is No , the send() just willn't sit blocked, but you have to
check what really happen with transmittion , why other side waiting and
can't receive what you sending. OTOH why default 64K of XP TCPwindowsize is
not suit you. Remember that setting reg value will change that for all
winsock not only your one
Arkady
"Shahul" <shahul1@chellasoft.com> wrote in message
news:uDbv1HU1FHA.2932@TK2MSFTNGP10.phx.gbl...
> hello Frenkel,
>
> By making the socket as non-blocking will solve my problem. Also I would
> like to change the value of "GlobalMaxTCPwindowsize" in TCPIP registry
> parameters as 1073741823, is it help to solve my issue.
>
> Could you please tell me what are the divantages of nonblocking socket
> (Currently I am using blocking socket, as you told by default). Using
> select() to get the Socket Trigger for nonblocking socket is nice idea or
> not?
>
> Thanks,
> shaham.
>
> "Arkady Frenkel" <arkadyf@hotmailxdotx.com> wrote in message
> news:OcPwRtJ1FHA.3124@TK2MSFTNGP12.phx.gbl...
> by
> I
> check
> local
> or
> TCPIP
> correct
>
>



Shahul

2005-10-21, 3:55 am

Dear Frenkel,

The other side is ready to receive the message and wait for socket firing
using select().
If the select() returns error ( -1)means, it might be due to the corruption
of FDSET. But in my case select() returns 0 , so it seems to be, there is no
corruption at the FDSET.
Could you tell me any other case that can corrupt the FDSET or makes
select() fails?
I am not able reproduce this case frequently, so please guide me with
various clues.

regards,
shaham

"Arkady Frenkel" <arkadyf@hotmailxdotx.com> wrote in message
news:uk#n#HV1FHA.3756@tk2msftngp13.phx.gbl...
> IMHO the answer is No , the send() just willn't sit blocked, but you have

to
> check what really happen with transmittion , why other side waiting and
> can't receive what you sending. OTOH why default 64K of XP TCPwindowsize

is
> not suit you. Remember that setting reg value will change that for all
> winsock not only your one
> Arkady
> "Shahul" <shahul1@chellasoft.com> wrote in message
> news:uDbv1HU1FHA.2932@TK2MSFTNGP10.phx.gbl...
socket[color=darkred]
or[color=darkred]
blocked )[color=darkred]
end[color=darkred]
facing[color=darkred]
end[color=darkred]
new[color=darkred]
returns[color=darkred]
right???[color=darkred]
>
>



Arkady Frenkel

2005-10-21, 6:56 pm

Check what is return code with (WSA)GetLastError immediately after select()
return error
Arkady

"Shahul" <shahul1@chellasoft.com> wrote in message
news:eG7mYbg1FHA.2540@TK2MSFTNGP09.phx.gbl...
> Dear Frenkel,
>
> The other side is ready to receive the message and wait for socket firing
> using select().
> If the select() returns error ( -1)means, it might be due to the
> corruption
> of FDSET. But in my case select() returns 0 , so it seems to be, there is
> no
> corruption at the FDSET.
> Could you tell me any other case that can corrupt the FDSET or makes
> select() fails?
> I am not able reproduce this case frequently, so please guide me with
> various clues.
>
> regards,
> shaham
>
> "Arkady Frenkel" <arkadyf@hotmailxdotx.com> wrote in message
> news:uk#n#HV1FHA.3756@tk2msftngp13.phx.gbl...
> to
> is
> socket
> or
> blocked )
> end
> facing
> end
> new
> returns
> right???
>
>



Alexander Nickolov

2005-10-21, 6:56 pm

Can you show some code around your select? Also, can you
ascertain there are no LSPs installed on the machine? A clean
and patched WinXP installation would be perfect to test with.
I'm talking about the reader obviously.

--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD
email: agnickolov@mvps.org
MVP VC FAQ: http://www.mvps.org/vcfaq
=====================================

"Shahul" <shahul1@chellasoft.com> wrote in message
news:eG7mYbg1FHA.2540@TK2MSFTNGP09.phx.gbl...
> Dear Frenkel,
>
> The other side is ready to receive the message and wait for socket firing
> using select().
> If the select() returns error ( -1)means, it might be due to the
> corruption
> of FDSET. But in my case select() returns 0 , so it seems to be, there is
> no
> corruption at the FDSET.
> Could you tell me any other case that can corrupt the FDSET or makes
> select() fails?
> I am not able reproduce this case frequently, so please guide me with
> various clues.
>
> regards,
> shaham
>
> "Arkady Frenkel" <arkadyf@hotmailxdotx.com> wrote in message
> news:uk#n#HV1FHA.3756@tk2msftngp13.phx.gbl...
> to
> is
> socket
> or
> blocked )
> end
> facing
> end
> new
> returns
> right???
>
>



Stephen Griffin [MSFT]

2005-10-21, 6:56 pm

Removing microsoft.public.win32.programmer.messaging from future replies.
This is not a messaging issue.

"Alexander Nickolov" <agnickolov@mvps.org> wrote in message
news:eF4t5pl1FHA.3256@TK2MSFTNGP09.phx.gbl...
> Can you show some code around your select? Also, can you
> ascertain there are no LSPs installed on the machine? A clean
> and patched WinXP installation would be perfect to test with.
> I'm talking about the reader obviously.
>
> --
> =====================================
> Alexander Nickolov
> Microsoft MVP [VC], MCSD
> email: agnickolov@mvps.org
> MVP VC FAQ: http://www.mvps.org/vcfaq
> =====================================
>
> "Shahul" <shahul1@chellasoft.com> wrote in message
> news:eG7mYbg1FHA.2540@TK2MSFTNGP09.phx.gbl...
>
>



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com