|
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
|
|
|
|
|
Thank you. I know understand it all.
|
|
|
|
|
Does anyone have a good solution for integrating some C# code into a java application?
without using web services. is ther any way to integration java files using c#
try and try untill reach success..
|
|
|
|
|
You may find some converter tools if you search on the internet.
Me, I'm dishonest. And a dishonest man you can always trust to be dishonest. Honestly. It's the honest ones you want to watch out for...
|
|
|
|
|
|
thanks Abhinav, i found there is a third party tool called GrassHopper, but i dont want to use any third party tool.
try and try untill reach success..
|
|
|
|
|
Rajeshwar Code- Developer wrote: Does anyone have a good solution for integrating some C# code into a java application?
without using web services. is ther any way to integration java files using c#
You seem to have posed your question from both sides. Do you want to use a Java application from within a C# app, or do you want to call a C# library from Java?
MVP 2010 - are they mad?
|
|
|
|
|
i want to use java application
try and try untill reach success..
|
|
|
|
|
Rajeshwar Code- Developer wrote: i want to use java application
Well that was clear from your original post. How do you want to use it, do you
i) have a Java application that needs to use the facilities of a C# library, or
ii) hava a C# application that wants to load and run a Java Virtual machine to get access to some Java features?
Please try and state your requirements clearly.
MVP 2010 - are they mad?
|
|
|
|
|
actually this question asked in one of the interviewer so .i wnat to know actually what is the answer.
try and try untill reach success..
|
|
|
|
|
Rajeshwar Code- Developer wrote: actually this question asked in one of the interviewer so .i wnat to know actually what is the answer.
Liquid Nitrogen!
MVP 2010 - are they mad?
|
|
|
|
|
I'll explain to you the easy way why this is a bad method to make a good application.
It's like in the morning when you want to eat breakfast, you can chose between some plums (Java) or a glass of milk (C#). What happens when you mix this two.. don't try it!
A good practice: eat only the glass of milk
Cheer's,
Alex Manolescu
|
|
|
|
|
when i finished my project and published it
then when i begin to report,it shows:
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.IO.FileNotFoundException: Could not load file or assembly 'CrystalDecisions.Windows.Forms, Version=12.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies.
i use VS2008 and crystal report 2008,i do not know how to do ?
|
|
|
|
|
You need to install the crystal reports framework.
Do a search for the merge modules on the crystal reports site.
|
|
|
|
|
How to right-to-left and change language(i wanna persian Language for it) of MS Agent ?
|
|
|
|
|
|
I was fighting a similar issue yesterday night...
There is a memory leak happening. every time you create a curson, there is new object being created. Checkout in TaskManager... Number of GDIobjects and UserObjects go to a damn high.
check out this tutorial:
http://www.switchonthecode.com/tutorials/csharp-tutorial-how-to-use-custom-cursors[^]
In the comments, User: Aerdanel has sorted the memory leaks. Use the same method for your custom cursor.
Som
|
|
|
|
|
did you remove the message?
|
|
|
|
|
How to open tooltip in the bellow of textbox(I mean any control)?
|
|
|
|
|
Message Closed
modified 23-Nov-14 6:50am.
|
|
|
|
|
Thanks!
the site you sent has problem!
I want this for windows application?
So Help!
|
|
|
|
|
How to right to left the text in tooltip ?
my code is
ToolTip tpl = new ToolTip();
tpl.IsBalloon = true;
tpl.ToolTipIcon = ToolTipIcon.Error;
tpl.ToolTipTitle = "آيا رمز عبور خود را فراموش كرده ايد؟";
tpl.Show(" \n لطفاً دوباره امتحان نماييد. \n از كوچك و بزرگ بودن حروف رمز عبور مطمئن شويد.", txt, txt.Left-40, txt.Top-20, 3000);
|
|
|
|
|
Message Closed
modified 23-Nov-14 6:50am.
|
|
|
|
|
This site has problems!
How to right-to-left the tooltip !
|
|
|
|
|
Hi my friends. I was working on one of my application in C# and i was using the following code
MessageBox.Show("Are you sure", "Confirm", MessageBoxButtons.YesNo, MessageBoxIcon.Information);
after this line of code it comes a messagebox which says "Are you sure" ... and Yes and No buttons ... but I wanted to know which button was pressed ... .. i.e If the user presses yes ... I want to delete some thing from Database ... If not continue as it is ..... Can any body tell me how to operate on this question.
Thank you
|
|
|
|
|
Message Closed
modified 23-Nov-14 6:53am.
|
|
|
|