 			socket = new Socket();
 			socket.addEventListener(Event.CLOSE, socketClosed);
 			socket.addEventListener(Event.CONNECT, socketConnected);
-			socket.addEventListener(IOErrorEvent.IO_ERROR, onSecurityError);
+			socket.addEventListener(IOErrorEvent.IO_ERROR, onIOError);
 			socket.addEventListener(ProgressEvent.SOCKET_DATA, socketDataReceived);
 			socket.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onSecurityError);
 		}

		 * @see	org.igniterealtime.xiff.data.ISerializable
		 * @example	The following example sends a basic chat message to the user with the
		 * JID "sideshowbob@springfieldpenitentiary.gov".<br />
		 * <pre>var msg:Message = new Message( "sideshowbob@springfieldpenitentiary.gov", null, "Hi Bob.",
		 * "<b>Hi Bob.</b>", Message.CHAT_TYPE );
		 * myXMPPConnection.send( msg );</pre>
		 */
		public function send( o:XMPPStanza ):void
		{

	{
		/**
		 * Stream type lets user set opening/closing tag.
		 * <code>&lt;stream:stream&gt;</code>
		 */
		public static const STREAM_TYPE_STANDARD:uint = 0;
		/**
		 * Stream type lets user set opening/closing tag.
		 * <code>&lt;stream:stream /&gt;</code>
		 */
		public static const STREAM_TYPE_STANDARD_TERMINATED:uint = 1;
		/**
		 * Stream type lets user set opening/closing tag.
		 * <code>&lt;flash:stream&gt;</code>
		 */
		public static const STREAM_TYPE_FLASH:uint = 2;
		/**
		 * Stream type lets user set opening/closing tag.
		 * <code>&lt;flash:stream /&gt;</code>
		 */
		public static const STREAM_TYPE_FLASH_TERMINATED:uint = 3;
		
