<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Mossy&#039;s World</title>
	<atom:link href="http://www.mrmoss.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mrmoss.net</link>
	<description>Weird Stuff..</description>
	<lastBuildDate>Mon, 09 Nov 2009 14:19:59 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Fitted Forge Split-R Valve</title>
		<link>http://www.mrmoss.net/2009/11/fitted-forge-split-r-valve/</link>
		<comments>http://www.mrmoss.net/2009/11/fitted-forge-split-r-valve/#comments</comments>
		<pubDate>Mon, 09 Nov 2009 14:19:54 +0000</pubDate>
		<dc:creator>Acidic32</dc:creator>
				<category><![CDATA[Audi A4 Cabriolet]]></category>

		<guid isPermaLink="false">http://www.mrmoss.net/?p=26</guid>
		<description><![CDATA[Ok, so i went and brought a Forge Split-R Valve as the standard Bosch valve was broken&#8230;
I snapped the Vacuum port on the Standard Bosch valve and fixed it temporary by a piece of metal from a telescopic aerial and some repair putty gunk.


And here is the valve all fitted and in place

It makes a [...]]]></description>
			<content:encoded><![CDATA[<p>Ok, so i went and brought a Forge Split-R Valve as the standard Bosch valve was broken&#8230;</p>
<p>I snapped the Vacuum port on the Standard Bosch valve and fixed it temporary by a piece of metal from a telescopic aerial and some repair putty gunk.<br />
<a href="http://www.mrmoss.net/wp-content/uploads/2009/11/09112009046.jpg"><img src="http://www.mrmoss.net/wp-content/uploads/2009/11/09112009046-300x225.jpg" alt="09112009046" title="09112009046" width="300" height="225" class="alignnone size-medium wp-image-28" /></a><br />
<a href="http://www.mrmoss.net/wp-content/uploads/2009/11/09112009045.jpg"><img src="http://www.mrmoss.net/wp-content/uploads/2009/11/09112009045-300x225.jpg" alt="09112009045" title="09112009045" width="300" height="225" class="alignnone size-medium wp-image-27" /></a></p>
<p>And here is the valve all fitted and in place</p>
<p><a href="http://www.mrmoss.net/wp-content/uploads/2009/11/mo.jpg"><img src="http://www.mrmoss.net/wp-content/uploads/2009/11/mo-300x225.jpg" alt="mo" title="mo" width="300" height="225" class="alignnone size-medium wp-image-33" /></a></p>
<p>It makes a nice sound whilst keeping the ECU happy! <img src='http://www.mrmoss.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.mrmoss.net/2009/11/fitted-forge-split-r-valve/feed/</wfw:commentRss>
		<slash:comments>29</slash:comments>
		</item>
		<item>
		<title>Car is back on Road, Taxed and MOT&#8217;d</title>
		<link>http://www.mrmoss.net/2009/11/car-is-back-on-road-taxed-and-motd/</link>
		<comments>http://www.mrmoss.net/2009/11/car-is-back-on-road-taxed-and-motd/#comments</comments>
		<pubDate>Mon, 09 Nov 2009 14:07:22 +0000</pubDate>
		<dc:creator>Acidic32</dc:creator>
				<category><![CDATA[Audi A4 Cabriolet]]></category>

		<guid isPermaLink="false">http://www.mrmoss.net/?p=23</guid>
		<description><![CDATA[Well the Audi is finally back on the road, its been Taxed and MOT&#8217;d, so its all good!
Final figure was £2,200 for Engine, MOT, Tax new Turbo and Clutch.
So its all go now!  
]]></description>
			<content:encoded><![CDATA[<p>Well the Audi is finally back on the road, its been Taxed and MOT&#8217;d, so its all good!</p>
<p>Final figure was £2,200 for Engine, MOT, Tax new Turbo and Clutch.</p>
<p>So its all go now! <img src='http://www.mrmoss.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.mrmoss.net/2009/11/car-is-back-on-road-taxed-and-motd/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>C# &#8211; Easy Sockets Class</title>
		<link>http://www.mrmoss.net/2009/10/c-easy-sockets-class/</link>
		<comments>http://www.mrmoss.net/2009/10/c-easy-sockets-class/#comments</comments>
		<pubDate>Fri, 16 Oct 2009 07:43:12 +0000</pubDate>
		<dc:creator>Acidic32</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.mrmoss.net/?p=17</guid>
		<description><![CDATA[/*
* Sockets Client
* (C)2009 Daniel Moss
*
* Handles all of the Socket functions
*
*/
internal class StateObject
{
public byte[] buffer = new byte[32768];
public int BufferSize = 32767;
public StringBuilder sb = new StringBuilder();
public Socket workSocket;
}
internal class SocketsClient
{
#region Delegates
public delegate void onConnectEventHandler();
public delegate void onDataArrivalEventHandler(byte[] Data, int TotalBytes);
public delegate void onDisconnectEventHandler();
public delegate void onErrorEventHandler(string Description);
public delegate void onSendCompleteEventHandler(int DataSize);
#endregion
private static Socket [...]]]></description>
			<content:encoded><![CDATA[<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">/*</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">* Sockets Client</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">* (C)2009 Daniel Moss</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">*</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">* Handles all of the Socket functions</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">*</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">*/</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">internal class StateObject</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">{</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">public byte[] buffer = new byte[32768];</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">public int BufferSize = 32767;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">public StringBuilder sb = new StringBuilder();</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">public Socket workSocket;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">}</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">internal class SocketsClient</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">{</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">#region Delegates</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">public delegate void onConnectEventHandler();</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">public delegate void onDataArrivalEventHandler(byte[] Data, int TotalBytes);</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">public delegate void onDisconnectEventHandler();</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">public delegate void onErrorEventHandler(string Description);</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">public delegate void onSendCompleteEventHandler(int DataSize);</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">#endregion</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">private static Socket  client = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">private static IPHostEntry ipHostInfo = Dns.GetHostEntry(&#8221;localhost&#8221;);</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">private static IPAddress ipAddress = ipHostInfo.AddressList[0];</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">private static int port = 44;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">// private static string response;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">public event onConnectEventHandler onConnect;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">public event onErrorEventHandler onError;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">public event onDataArrivalEventHandler onDataArrival;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">public event onDisconnectEventHandler onDisconnect;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">public event onSendCompleteEventHandler onSendComplete;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">public void Connect(string RemoteHostName, int RemotePort)</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">{</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">try</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">{</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">client = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">port = RemotePort;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">ipHostInfo = Dns.GetHostEntry(RemoteHostName);</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">ipAddress = ipHostInfo.AddressList[0];</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">var remoteEP = new IPEndPoint(ipAddress, port);</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">client.BeginConnect(remoteEP, sockConnected, client);</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">}</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">catch (Exception ex)</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">{</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">if (onError != null)</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">onError(ex.Message);</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">return;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">}</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">}</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">public void SendData(byte[] Data)</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">{</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">try</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">{</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">var byteData = Data;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">client.BeginSend(byteData, 0, byteData.Length, 0, sockSendEnd, client);</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">}</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">catch (Exception ex)</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">{</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">if (onError != null)</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">onError(ex.Message);</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">return;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">}</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">}</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">public void Disconnect()</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">{</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">try</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">{</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">client.Shutdown(SocketShutdown.Both);</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">}</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">catch</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">{</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">}</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">onDisconnect();</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">client.Close();</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">}</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">public byte[] StringToBytes(string Data)</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">{</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">return Encoding.ASCII.GetBytes(Data);</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">}</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">public string BytestoString(byte[] Data)</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">{</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">return Encoding.ASCII.GetString(Data);</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">}</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">private void sockConnected(IAsyncResult ar)</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">{</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">try</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">{</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">if (client.Connected == false)</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">{</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">if (onError != null)</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">onError(&#8221;Connection refused.&#8221;);</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">return;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">}</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">var state = new StateObject();</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">state.workSocket = client;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">client.BeginReceive(state.buffer, 0, state.BufferSize, 0, sockDataArrival, state);</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">if (onConnect != null)</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">onConnect();</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">}</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">catch (Exception ex)</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">{</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">if (onError != null)</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">onError(ex.Message);</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">return;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">}</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">}</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">private void sockDataArrival(IAsyncResult ar)</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">{</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">var state = (StateObject)ar.AsyncState;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">var client = state.workSocket;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">var bytesRead = 0;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">try</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">{</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">bytesRead = client.EndReceive(ar);</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">}</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">catch</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">{</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">return;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">}</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">try</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">{</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">var Data = state.buffer;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">if (bytesRead == 0)</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">{</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">client.Shutdown(SocketShutdown.Both);</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">client.Close();</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">if (onDisconnect != null)</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">onDisconnect();</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">return;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">}</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">state.buffer = new byte[32768];</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">client.BeginReceive(state.buffer, 0, state.BufferSize, 0, sockDataArrival, state);</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">if (onDataArrival != null)</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">onDataArrival(Data, bytesRead);</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">}</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">catch (Exception ex)</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">{</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">if (onError != null)</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">onError(ex.Message);</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">return;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">}</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">}</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">private void sockSendEnd(IAsyncResult ar)</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">{</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">try</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">{</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">var client = (Socket)ar.AsyncState;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">var bytesSent = client.EndSend(ar);</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">if (onSendComplete != null)</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">onSendComplete(bytesSent);</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">}</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">catch (Exception ex)</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">{</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">if (onError != null)</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">onError(ex.Message);</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">return;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">}</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">}</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">public bool Connected()</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">{</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">try</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">{</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">return client.Connected;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">}</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">catch (Exception ex)</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">{</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">if (onError != null)</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">onError(ex.Message);</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">return false;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">}</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">}</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">}</div>
<pre lang="**csharp**">
    /*
     * Sockets Class
     * (C)2009 Daniel Moss
     *
     * Handles all of the Socket functions
     * DO NOT REMOVE (C) NOTICE!
     *
     */

    internal class StateObject
    {
        public byte[] buffer = new byte[32768];
        public int BufferSize = 32767;
        public StringBuilder sb = new StringBuilder();
        public Socket workSocket;
    }

    internal class SocketsClass
    {
        #region Delegates

        public delegate void onConnectEventHandler();

        public delegate void onDataArrivalEventHandler(byte[] Data, int TotalBytes);

        public delegate void onDisconnectEventHandler();

        public delegate void onErrorEventHandler(string Description);

        public delegate void onSendCompleteEventHandler(int DataSize);

        #endregion

        private static Socket  client = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
        private static IPHostEntry ipHostInfo = Dns.GetHostEntry("localhost");
        private static IPAddress ipAddress = ipHostInfo.AddressList[0];
        private static int port = 44;
       // private static string response;
        public event onConnectEventHandler onConnect;

        public event onErrorEventHandler onError;

        public event onDataArrivalEventHandler onDataArrival;

        public event onDisconnectEventHandler onDisconnect;

        public event onSendCompleteEventHandler onSendComplete;

        public void Connect(string RemoteHostName, int RemotePort)
        {
            try
            {
                client = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
                port = RemotePort;
                ipHostInfo = Dns.GetHostEntry(RemoteHostName);
                ipAddress = ipHostInfo.AddressList[0];
                var remoteEP = new IPEndPoint(ipAddress, port);
                client.BeginConnect(remoteEP, sockConnected, client);
            }
            catch (Exception ex)
            {
                if (onError != null)

                    onError(ex.Message);
                return;
            }
        }

        public void SendData(byte[] Data)
        {
            try
            {
                var byteData = Data;
                client.BeginSend(byteData, 0, byteData.Length, 0, sockSendEnd, client);
            }
            catch (Exception ex)
            {
                if (onError != null)

                    onError(ex.Message);
                return;
            }
        }

        public void Disconnect()
        {
            try
            {

                client.Shutdown(SocketShutdown.Both);
            }
            catch
            {
            }
            onDisconnect();
            client.Close();
        }

        public byte[] StringToBytes(string Data)
        {
            return Encoding.ASCII.GetBytes(Data);
        }

        public string BytestoString(byte[] Data)
        {
            return Encoding.ASCII.GetString(Data);
        }

        private void sockConnected(IAsyncResult ar)
        {
            try
            {
                if (client.Connected == false)
                {
                    if (onError != null)
                        onError("Connection refused.");
                    return;
                }
                var state = new StateObject();
                state.workSocket = client;
                client.BeginReceive(state.buffer, 0, state.BufferSize, 0, sockDataArrival, state);
                if (onConnect != null)
                    onConnect();
            }
            catch (Exception ex)
            {
                if (onError != null)

                    onError(ex.Message);
                return;
            }
        }

        private void sockDataArrival(IAsyncResult ar)
        {
            var state = (StateObject)ar.AsyncState;
            var client = state.workSocket;
            var bytesRead = 0;

            try
            {
                bytesRead = client.EndReceive(ar);
            }
            catch
            {
                return;
            }

            try
            {
                var Data = state.buffer;
                if (bytesRead == 0)
                {
                    client.Shutdown(SocketShutdown.Both);
                    client.Close();
                    if (onDisconnect != null)
                        onDisconnect();
                    return;
                }
                state.buffer = new byte[32768];

                client.BeginReceive(state.buffer, 0, state.BufferSize, 0, sockDataArrival, state);
                if (onDataArrival != null)
                    onDataArrival(Data, bytesRead);
            }
            catch (Exception ex)
            {
                if (onError != null)

                    onError(ex.Message);
                return;
            }
        }

        private void sockSendEnd(IAsyncResult ar)
        {
            try
            {
                var client = (Socket)ar.AsyncState;
                var bytesSent = client.EndSend(ar);
                if (onSendComplete != null)
                    onSendComplete(bytesSent);
            }
            catch (Exception ex)
            {
                if (onError != null)

                    onError(ex.Message);
                return;
            }
        }

        public bool Connected()
        {
            try
            {
                return client.Connected;
            }
            catch (Exception ex)
            {
                if (onError != null)

                    onError(ex.Message);
                return false;
            }
        }
    }
</pre>
<p>private SocketsClass pClient = new SocketsClass ();</p>
<p>You can then use event handlers such as:</p>
<p>pClient.onConnect += this.Client_onConnect;</p>
<p>pClient.onDataArrival += this.Client_onDataArrival;</p>
<p>pClient.onError += this.Client_onError;</p>
<p>pClient.onDisconnect += this.Client_onDisconnect;</p>
<p>pClient.onSendComplete +=this.Client_onSendComplete;</p>
<p>Hope this is useful to people <img src='http://www.mrmoss.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Took me ages to work this out</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mrmoss.net/2009/10/c-easy-sockets-class/feed/</wfw:commentRss>
		<slash:comments>44</slash:comments>
		</item>
		<item>
		<title>C# &#8211; Configure Proxy for Webclient</title>
		<link>http://www.mrmoss.net/2009/10/c-configure-proxy-for-webclient/</link>
		<comments>http://www.mrmoss.net/2009/10/c-configure-proxy-for-webclient/#comments</comments>
		<pubDate>Thu, 15 Oct 2009 22:18:36 +0000</pubDate>
		<dc:creator>Acidic32</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.mrmoss.net/?p=15</guid>
		<description><![CDATA[Snippet of code to configure a web proxy
private static readonly IWebProxy sDefaultProxy = WebRequest.DefaultWebProxy;
public string ProxyUser = &#8220;&#8221;;
public string ProxyPassword = &#8220;&#8221;;
public bool ProxyUse = false;
public bool ProxyDefault = true;
public string ProxyAddress = &#8220;&#8221;;
public int ProxyPort = 80;
public static void ProxyConfig()
{
if (Controller.Config.Default.ProxyUse)
{
NetworkCredential credential = null;
if ((Controller.Config.Default.ProxyUser.Length &#62; 0) &#124;&#124;
(Controller.Config.Default.ProxyPassword.Length &#62; 0))
{
credential = new NetworkCredential();
credential.UserName = [...]]]></description>
			<content:encoded><![CDATA[<p>Snippet of code to configure a web proxy</p>
<blockquote><p>private static readonly IWebProxy sDefaultProxy = WebRequest.DefaultWebProxy;</p>
<p>public string ProxyUser = &#8220;&#8221;;<br />
public string ProxyPassword = &#8220;&#8221;;<br />
public bool ProxyUse = false;<br />
public bool ProxyDefault = true;<br />
public string ProxyAddress = &#8220;&#8221;;<br />
public int ProxyPort = 80;</p></blockquote>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">public static void ProxyConfig()</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">{</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">if (Controller.Config.Default.ProxyUse)</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">{</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">NetworkCredential credential = null;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">if ((Controller.Config.Default.ProxyUser.Length &gt; 0) ||</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">(Controller.Config.Default.ProxyPassword.Length &gt; 0))</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">{</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">credential = new NetworkCredential();</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">credential.UserName = Controller.Config.Default.ProxyUser;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">credential.Password = Controller.Config.Default.ProxyPassword;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">}</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">if (!Controller.Config.Default.ProxyDefault)</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">{</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">var proxy = new WebProxy(Controller.Config.Default.ProxyAddress, Controller.Config.Default.ProxyPort);</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">if (credential != null)</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">{</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">proxy.Credentials = credential;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">}</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">WebRequest.DefaultWebProxy = proxy;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">}</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">else if (credential != null)</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">{</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">WebRequest.DefaultWebProxy.Credentials = credential;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">}</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">}</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">else</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">{</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">WebRequest.DefaultWebProxy = sDefaultProxy;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">}</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">}</div>
<blockquote><p>public static void ProxyConfig()</p>
<p>{</p>
<p>if (ProxyUse)</p>
<p>{</p>
<p>NetworkCredential credential = null;</p>
<p>if ((ProxyUser.Length &gt; 0) ||</p>
<p>(ProxyPassword.Length &gt; 0))</p>
<p>{</p>
<p>credential = new NetworkCredential();</p>
<p>credential.UserName = ProxyUser;</p>
<p>credential.Password = ProxyPassword;</p>
<p>}</p>
<p>if (!ProxyDefault)</p>
<p>{</p>
<p>var proxy = new WebProxy(ProxyAddress, .ProxyPort);</p>
<p>if (credential != null)</p>
<p>{</p>
<p>proxy.Credentials = credential;</p>
<p>}</p>
<p>WebRequest.DefaultWebProxy = proxy;</p>
<p>}</p>
<p>else if (credential != null)</p>
<p>{</p>
<p>WebRequest.DefaultWebProxy.Credentials = credential;</p>
<p>}</p>
<p>}</p>
<p>else</p>
<p>{</p>
<p>WebRequest.DefaultWebProxy = sDefaultProxy;</p>
<p>}</p>
<p>}</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.mrmoss.net/2009/10/c-configure-proxy-for-webclient/feed/</wfw:commentRss>
		<slash:comments>46</slash:comments>
		</item>
		<item>
		<title>Ford KA &#8211; Stupid Engines!</title>
		<link>http://www.mrmoss.net/2009/10/ford-ka-stupid-engines/</link>
		<comments>http://www.mrmoss.net/2009/10/ford-ka-stupid-engines/#comments</comments>
		<pubDate>Tue, 13 Oct 2009 11:26:49 +0000</pubDate>
		<dc:creator>Acidic32</dc:creator>
				<category><![CDATA[Car]]></category>

		<guid isPermaLink="false">http://www.mrmoss.net/?p=12</guid>
		<description><![CDATA[Well, who has a Ford KA? The stupid engine in them is ridicules.
Well i finally fixed the annoying Misfire, 4 leads, 4 plugs and a coil pack! Well just after fixing this, exhaust is blowing&#8230;.. then some twat borrows the KA, and takes the wing mirror off! MORE EXPENSE!
I JUST WANT TO SELL THE CAR!
http://tinyurl.com/fordka13
Buy [...]]]></description>
			<content:encoded><![CDATA[<p>Well, who has a Ford KA? The stupid engine in them is ridicules.</p>
<p>Well i finally fixed the annoying Misfire, 4 leads, 4 plugs and a coil pack! Well just after fixing this, exhaust is blowing&#8230;.. then some twat borrows the KA, and takes the wing mirror off! MORE EXPENSE!</p>
<p>I JUST WANT TO SELL THE CAR!</p>
<p>http://tinyurl.com/fordka13</p>
<p>Buy it please ! <img src='http://www.mrmoss.net/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.mrmoss.net/2009/10/ford-ka-stupid-engines/feed/</wfw:commentRss>
		<slash:comments>28</slash:comments>
		</item>
		<item>
		<title>About this blog</title>
		<link>http://www.mrmoss.net/2009/10/about-this-blog/</link>
		<comments>http://www.mrmoss.net/2009/10/about-this-blog/#comments</comments>
		<pubDate>Sun, 11 Oct 2009 19:03:28 +0000</pubDate>
		<dc:creator>Acidic32</dc:creator>
				<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://www.mrmoss.net/?p=10</guid>
		<description><![CDATA[I will use this blog for posting about my Audi A4 &#8211; The mods and upgrades and pictures of it in progress, before and after etc.
Also any programming hints and tips and general Development news.
Then there is my personal bloggage&#8230;.well thats easy!
]]></description>
			<content:encoded><![CDATA[<p>I will use this blog for posting about my Audi A4 &#8211; The mods and upgrades and pictures of it in progress, before and after etc.</p>
<p>Also any programming hints and tips and general Development news.</p>
<p>Then there is my personal bloggage&#8230;.well thats easy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mrmoss.net/2009/10/about-this-blog/feed/</wfw:commentRss>
		<slash:comments>52</slash:comments>
		</item>
		<item>
		<title>Reconditioned Engine!</title>
		<link>http://www.mrmoss.net/2009/10/reconditioned-engine/</link>
		<comments>http://www.mrmoss.net/2009/10/reconditioned-engine/#comments</comments>
		<pubDate>Sun, 11 Oct 2009 16:17:31 +0000</pubDate>
		<dc:creator>Acidic32</dc:creator>
				<category><![CDATA[Audi A4 Cabriolet]]></category>

		<guid isPermaLink="false">http://www.mrmoss.net/?p=6</guid>
		<description><![CDATA[Well, the car is finally in the garage having a reconditioned engine fitted, this includes new internals and reconditioned Turbo.
Once the car&#8217;s back, its Dump valve time, and start on the Bodywork!
Price for Reconditioned: £1,500!
Hopefully worth it, and remove the bottom end rattle!
]]></description>
			<content:encoded><![CDATA[<p>Well, the car is finally in the garage having a reconditioned engine fitted, this includes new internals and reconditioned Turbo.</p>
<p>Once the car&#8217;s back, its Dump valve time, and start on the Bodywork!</p>
<p>Price for Reconditioned: £1,500!</p>
<p>Hopefully worth it, and remove the bottom end rattle!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mrmoss.net/2009/10/reconditioned-engine/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
