Welcome Guest Search | Active Topics | Members | Log In | Register

About ExtendedParameters Options
admin
Posted: Wednesday, October 01, 2008 7:19:05 PM
Rank: Administration
Groups: Administration

Joined: 2/15/2008
Posts: 130
Points: 835
ExtendedParameters is an optional parameter in Network.AcceptAsync, which may be used to adjust the listener according to your needs.

Code:
using (var listener = Network.AcceptAsync(new IPEndPoint(IPAddress.Any, 80), OnAccept,
                new ExtendedParameters {Backlog=1024}))
{
    ...
}


ExtendedParameters Properties

int BufferSize - Defines buffer size for read operations
int MinimumPreparedConnections - Defines minimum amount of connections in the pool at any time.
int MaximumTotalConnections - Allows to limit number of total connections in order to keep the system stable.
int DeltaConnections - Defines how many connections should be prepared when they are required.
int Backlog - Defines socket backlog parameter.
bool Optimized - Allows to optimize accept operation by waiting for the first data to arrive

If ExtendedParameters are not specified then default values are used:

int BufferSize = 8192 //8kbytes
int MinimumPreparedConnections = 1024
int MaximumTotalConnections = Int16.MaxValue
int DeltaConnections = 256
int Backlog = 1024
bool Optimized = false //don't wait for data, return immediately

Morlack
Posted: Monday, March 16, 2009 5:08:25 AM
Rank: Member
Groups: Member

Joined: 3/13/2009
Posts: 3
Points: 9
Location: Italy
Hi,
I've not understood how works DeltaConnections.

Using the default values, I've 1024 "ready" connections in the pool and if I receive 1024+1 connections, will be prepared 256 new connections "ready" in the pool?

Thank you for your great work!

Mario
admin
Posted: Monday, March 16, 2009 5:31:53 AM
Rank: Administration
Groups: Administration

Joined: 2/15/2008
Posts: 130
Points: 835
Hi Mario,

DeltaConnection will not be used in the next version.

In the current version it means that once you have less than MinimumPreparedConnections(=1024) 'ready' connections in the pool, 256 new connections will be created.

Ex. If you have 1023 'ready' connection then DeltaConnections (=256) new connections will be created. So you will have 1023+256 'ready' connections in the pool. That was done to handle thousands of simultaneous connections.
Morlack
Posted: Monday, March 16, 2009 5:58:32 AM
Rank: Member
Groups: Member

Joined: 3/13/2009
Posts: 3
Points: 9
Location: Italy
Thanks you very much for the fast reply :)

Mario

AndreyTS
Posted: Thursday, September 10, 2009 12:50:32 AM
Rank: Newbie
Groups: Member

Joined: 9/10/2009
Posts: 1
Points: 3
Location: Moscow, Russia
admin wrote:

DeltaConnection will not be used in the next version.
...
That was done to handle thousands of simultaneous connections.


Could you explain, why did you decide to exclude this functionality?
admin
Posted: Thursday, September 10, 2009 2:35:15 AM
Rank: Administration
Groups: Administration

Joined: 2/15/2008
Posts: 130
Points: 835
This parameter will be set by the system internally, selecting the most optimal setting.
According to the new schedule this change will not be included in the next release.
richardtsy
Posted: Tuesday, September 15, 2009 11:14:02 AM
Rank: Newbie
Groups: Member

Joined: 9/14/2009
Posts: 1
Points: 3
I would like to know why the memory leak
Users browsing this topic
Guest


Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Main Forum RSS : RSS

YAFPro Theme Created by Jaben Cargman (Tiny Gecko)
Powered by Yet Another Forum.net version 1.9.1.6 (NET v2.0) - 11/14/2007
Copyright © 2003-2006 Yet Another Forum.net. All rights reserved.
This page was generated in 0.121 seconds.
15 queries (0.040 seconds, 33.06%).

yaf_pageload: 0.005
yaf_replace_words_list: 0.001
yaf_topic_info: 0.001
yaf_forum_list: 0.001
yaf_forum_listpath: 0.001
yaf_forum_listpath: 0.001
yaf_post_list: 0.017
yaf_usergroup_list: 0.001
yaf_usergroup_list: 0.002
yaf_usergroup_list: 0.002
yaf_usergroup_list: 0.002
yaf_usergroup_list: 0.001
yaf_usergroup_list: 0.001
yaf_usergroup_list: 0.002
yaf_active_listtopic: 0.002