Example #1
0
 void _conn_onConnecting(object sender, SocketConnectEventArgs e)
 {
     if (onSocketConnecting != null)
     {
         onSocketConnecting(sender, e);
     }
 }
Example #2
0
        void _conn_onConnected(object sender, SocketConnectEventArgs e)
        {
            if (onSocketConnected != null)
            {
                onSocketConnected(sender, e);
            }

            // Send the cookie and such.
            HoNBuffer.InsertBYTE(CHAT_CMD_AUTH_INFO);
            HoNBuffer.InsertBYTE(CHAT_FAMILY_C2S);
            HoNBuffer.InsertDWORD(this._userid);
            HoNBuffer.InsertString(this._cookie);
            HoNBuffer.InsertBYTE(0x00); // Don't know.
            HoNBuffer.InsertDWORD(CHAT_SERVER_VERSION);
            HoNBuffer.InsertDWORD(0); // Presumably invisible.
            this.Send();
        }
 //
 // Event raising methods
 //
 protected virtual void OnConnect(SocketConnectEventArgs e)
 {
     if (onConnected != null)
     {
         onConnected(this, e);
     }
 }
 protected virtual void OnConnectionAttempt(SocketConnectEventArgs e)
 {
     if (onConnecting != null)
     {
         onConnecting(this, e);
     }
 }
Example #5
0
 void hon_onSocketConnected(object sender, SocketConnectEventArgs e)
 {
     if (onConnect != null) onConnect(this, new EventArgs());
 }