Anyone can optimize this code ?

11/30/2013 00:57 marcbacor6666#16
Code:
 public void BeginAccept(AsyncCallback async, object state)
        {
            if (!this.Disabled)
            {
                try
                {
                    if (!this.disconnected)
                    {
                        this.Connection.BeginAccept(async, state);
                    }
                }
                catch
                {
                    this.Disabled = true;
                }
            }
        }
Quote:
Originally Posted by GRASSHOPPA View Post
he already told you exactly where you are having the issue 0,0?
if you aren't even willing to attempt it why would people give you help...?
don't try to run your own server if you don't want to put in the work
kindly reply to my beginaccept code.

made it like this

Code:
   public void BeginAccept(AsyncCallback async, object state)
        {
                try
                {
                    if (!this.disconnected)
                    {
                        this.Connection.BeginAccept(async, state);
                    }
                }
                catch { }
                this.Connection.BeginAccept(async, state);
                
            }
11/30/2013 06:26 pro4never#17
Quote:
Originally Posted by marcbacor6666 View Post
Code:
 public void BeginAccept(AsyncCallback async, object state)
        {
            if (!this.Disabled)
            {
                try
                {
                    if (!this.disconnected)
                    {
                        this.Connection.BeginAccept(async, state);
                    }
                }
                catch
                {
                    this.Disabled = true;
                }
            }
        }


kindly reply to my beginaccept code.

made it like this

Code:
   public void BeginAccept(AsyncCallback async, object state)
        {
                try
                {
                    if (!this.disconnected)
                    {
                        this.Connection.BeginAccept(async, state);
                    }
                }
                catch { }
                this.Connection.BeginAccept(async, state);
                
            }
Now you're running the same code twice.
11/30/2013 06:31 marcbacor6666#18
can u help me
Quote:
pro4never
on what to do to that code :)

iv manage to see i think 1 of the reason why after a few hours runing the server the loginconnection freeze.

1. randomly after iv exited my character in game, the client exited but my character is still online in the game. now when i tried to relogin , i cant login, and no players can login also.