Пример #1
0
		public void Connect(EndPoint address)
		{
			if (address == null)
				throw new ArgumentNullException("address");

			if (_client != null)
				throw new InvalidOperationException(LocalizedStrings.Str2152);

			//this.AddInfoLog("BeginConnect");

			_client = new TcpClient();
			_client.Connect(address.GetHost(), address.GetPort());

			_incoming = _client.GetStream();
			_outgoing = _client.GetStream();
		}