Click here to Skip to main content
15,915,867 members
Home / Discussions / C#
   

C#

 
AnswerRe: very fast image conversion from jpg to bmp in c# [modified] Pin
The Zetta26-Jan-10 6:07
The Zetta26-Jan-10 6:07 
GeneralRe: very fast image conversion from jpg to bmp in c# Pin
Ennis Ray Lynch, Jr.26-Jan-10 10:48
Ennis Ray Lynch, Jr.26-Jan-10 10:48 
GeneralRe: very fast image conversion from jpg to bmp in c# Pin
The Zetta27-Jan-10 5:30
The Zetta27-Jan-10 5:30 
AnswerRe: very fast image conversion from jpg to bmp in c# Pin
Mohammad Mahdipour26-Jan-10 18:37
Mohammad Mahdipour26-Jan-10 18:37 
QuestionBasic SQL connection through classes Pin
Steve-Co26-Jan-10 0:09
Steve-Co26-Jan-10 0:09 
AnswerRe: Basic SQL connection through classes Pin
#realJSOP26-Jan-10 0:12
professional#realJSOP26-Jan-10 0:12 
GeneralRe: Basic SQL connection through classes Pin
Steve-Co26-Jan-10 0:24
Steve-Co26-Jan-10 0:24 
GeneralRe: Basic SQL connection through classes Pin
J4amieC26-Jan-10 0:41
J4amieC26-Jan-10 0:41 
AnswerRe: Basic SQL connection through classes Pin
i.j.russell26-Jan-10 0:57
i.j.russell26-Jan-10 0:57 
GeneralRe: Basic SQL connection through classes Pin
Not Active26-Jan-10 1:51
mentorNot Active26-Jan-10 1:51 
GeneralRe: Basic SQL connection through classes Pin
PIEBALDconsult26-Jan-10 4:11
mvePIEBALDconsult26-Jan-10 4:11 
GeneralRe: Basic SQL connection through classes Pin
#realJSOP26-Jan-10 6:45
professional#realJSOP26-Jan-10 6:45 
GeneralRe: Basic SQL connection through classes Pin
PIEBALDconsult26-Jan-10 6:52
mvePIEBALDconsult26-Jan-10 6:52 
AnswerRe: Basic SQL connection through classes Pin
kevinnicol26-Jan-10 2:39
kevinnicol26-Jan-10 2:39 
AnswerRe: Basic SQL connection through classes Pin
SilimSayo27-Jan-10 3:11
SilimSayo27-Jan-10 3:11 
QuestionA theoretical problem when coding a BUSY TCP/UDP server [modified] Pin
SimpleData25-Jan-10 23:03
SimpleData25-Jan-10 23:03 
AnswerRe: A theoratical problem when coding a BUSY TCP/UDP server Pin
harold aptroot25-Jan-10 23:27
harold aptroot25-Jan-10 23:27 
GeneralRe: A theoratical problem when coding a BUSY TCP/UDP server Pin
SimpleData26-Jan-10 6:55
SimpleData26-Jan-10 6:55 
GeneralRe: A theoratical problem when coding a BUSY TCP/UDP server Pin
harold aptroot26-Jan-10 7:12
harold aptroot26-Jan-10 7:12 
GeneralRe: A theoratical problem when coding a BUSY TCP/UDP server Pin
SimpleData26-Jan-10 8:06
SimpleData26-Jan-10 8:06 
GeneralRe: A theoratical problem when coding a BUSY TCP/UDP server Pin
harold aptroot26-Jan-10 8:38
harold aptroot26-Jan-10 8:38 
Ok, well I was in a good mood and decompiled TcpListener.Start for you.
public void Start()
{
    this.Start(0x7fffffff);
}
public void Start(int backlog)
{
    if ((backlog > 0x7fffffff) || (backlog < 0))
    {
        throw new ArgumentOutOfRangeException("backlog");
    }
    if (Logging.On)
    {
        Logging.Enter(Logging.Sockets, this, "Start", (string) null);
    }
    if (this.m_ServerSocket == null)
    {
        throw new InvalidOperationException(SR.GetString("net_InvalidSocketHandle"));
    }
    if (this.m_Active)
    {
        if (Logging.On)
        {
            Logging.Exit(Logging.Sockets, this, "Start", (string) null);
        }
    }
    else
    {
        this.m_ServerSocket.Bind(this.m_ServerSocketEP);
        this.m_ServerSocket.Listen(backlog);  <--- !!see here!!
        this.m_Active = true;
        if (Logging.On)
        {
            Logging.Exit(Logging.Sockets, this, "Start", (string) null);
        }
    }
}


So the result is a call to SomeSocket.Listen(int.MaxValue), which according to the documentation[^]: "Places a Socket in a listening state. Int32 backlog: The maximum length of the pending connections queue."

In other words, don't worry, the connections are being placed in the backlog. Of course it can happen that connections are being made at a faster rate than you can handle them, which is really just a denial of service attack. You can't do anything about that, no matter how many connections per second you can handle, they could just throw 1 more at you and you'd lose.

So it all comes down to "magic happens in the background in code that you didn't write", in a more theoretical setting in which connections are only accepted while you are waiting for them, you would have a theoretical problem. Fortunately real world sockets don't work that way Smile | :)
GeneralRe: A theoratical problem when coding a BUSY TCP/UDP server Pin
SimpleData26-Jan-10 9:23
SimpleData26-Jan-10 9:23 
Questionhow to call java files using c# Pin
Rajeshwar Code- Developer25-Jan-10 22:49
Rajeshwar Code- Developer25-Jan-10 22:49 
AnswerRe: how to call java files using c# Pin
Abhinav S25-Jan-10 22:52
Abhinav S25-Jan-10 22:52 
GeneralRe: how to call java files using c# Pin
Rajeshwar Code- Developer25-Jan-10 22:58
Rajeshwar Code- Developer25-Jan-10 22:58 

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.