private void Dispose(bool Disposing) { if (!this.mDisposed && Disposing) { this.mDisposed = true; try { base.Shutdown(SocketShutdown.Both); base.Close(); base.Dispose(); } catch { } Array.Clear(this.mDataBuffer, 0, this.mDataBuffer.Length); this.mDataBuffer = null; this.mDataReceivedCallback = null; this.mRouteReceivedDataCallback = null; PhoenixEnvironment.GetConnectionManager().DropConnection(this.mID); TcpAuthorization.FreeConnection(this.mIP); if (PhoenixEnvironment.GetConfig().data["emu.messages.connections"] == "1") { Console.WriteLine(string.Concat(new object[] { ">> Connection Dropped [", this.mID, "] from [", this.ipAddress, "]" })); } } }
/// <summary> /// Starts the connection, prepares the received data buffer and waits for data. /// </summary> public void Start(RouteReceivedDataCallback dataRouter) { mDataBuffer = new byte[RECEIVEDATA_BUFFER_SIZE]; mDataReceivedCallback = new AsyncCallback(DataReceived); mRouteReceivedDataCallback = dataRouter; WaitForData(); }
internal void Start(RouteReceivedDataCallback dataRouter) { this.mDataBuffer = new byte[0x400]; this.mDataReceivedCallback = new AsyncCallback(this.DataReceived); this.mDataSentCallback = new AsyncCallback(this.DataSent); this.mRouteReceivedDataCallback = dataRouter; this.WaitForData(); }
/// <summary> /// Starts the Connection, prepares the received data buffer and waits for data. /// </summary> internal void Start() { _dataBuffer = new byte[ReceivedataBufferSize]; _dataReceivedCallback = new AsyncCallback(DataReceived); _routeReceivedDataCallback = new RouteReceivedDataCallback(HandleConnectionData); Habbo = new Habbo(this); WaitForData(); }
/// <summary> /// Starts the connection, prepares the received data buffer and waits for data. /// </summary> public void Start() { mDataBuffer = new byte[RECEIVEDATA_BUFFER_SIZE]; mDataReceivedCallback = new AsyncCallback(DataReceived); mRouteReceivedDataCallback = new IonTcpConnection.RouteReceivedDataCallback(HandleConnectionData); this.mUser = new User(this); this.mUser.StartLoggedInValues(this); WaitForData(); }
public void Start(RouteReceivedDataCallback DataRouter) { this.Buffer = new byte[RCV_BUFFER_SIZE]; this.DataReceivedCallback = new AsyncCallback(DataReceived); this.RouteDataCallback = DataRouter; WaitForData(); }