<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.vc-mp.org/index.php?action=history&amp;feed=atom&amp;title=Scripting%2FSquirrel%2FFunctions%2FNewSocket%2FExample</id>
	<title>Scripting/Squirrel/Functions/NewSocket/Example - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.vc-mp.org/index.php?action=history&amp;feed=atom&amp;title=Scripting%2FSquirrel%2FFunctions%2FNewSocket%2FExample"/>
	<link rel="alternate" type="text/html" href="http://wiki.vc-mp.org/index.php?title=Scripting/Squirrel/Functions/NewSocket/Example&amp;action=history"/>
	<updated>2026-04-08T23:53:25Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>http://wiki.vc-mp.org/index.php?title=Scripting/Squirrel/Functions/NewSocket/Example&amp;diff=19055&amp;oldid=prev</id>
		<title>Ysc3839: Created page with &quot;== Client == An HTTP request example. &lt;source lang=squirrel&gt;function HTTP() { 	Socket &lt;- NewSocket( &quot;dataReceived&quot; ); 	Socket.SetNewConnFunc( &quot;newConn&quot; ); 	Socket.Connect( &quot;ww...&quot;</title>
		<link rel="alternate" type="text/html" href="http://wiki.vc-mp.org/index.php?title=Scripting/Squirrel/Functions/NewSocket/Example&amp;diff=19055&amp;oldid=prev"/>
		<updated>2016-03-11T15:28:38Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;== Client == An HTTP request example. &amp;lt;source lang=squirrel&amp;gt;function HTTP() { 	Socket &amp;lt;- NewSocket( &amp;quot;dataReceived&amp;quot; ); 	Socket.SetNewConnFunc( &amp;quot;newConn&amp;quot; ); 	Socket.Connect( &amp;quot;ww...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Client ==&lt;br /&gt;
An HTTP request example.&lt;br /&gt;
&amp;lt;source lang=squirrel&amp;gt;function HTTP()&lt;br /&gt;
{&lt;br /&gt;
	Socket &amp;lt;- NewSocket( &amp;quot;dataReceived&amp;quot; );&lt;br /&gt;
	Socket.SetNewConnFunc( &amp;quot;newConn&amp;quot; );&lt;br /&gt;
	Socket.Connect( &amp;quot;www.example.com&amp;quot;, 80 )&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function dataReceived( data )&lt;br /&gt;
{&lt;br /&gt;
	print( data );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function newConn()&lt;br /&gt;
{&lt;br /&gt;
	local request = @&amp;quot;GET / HTTP/1.0&lt;br /&gt;
Host: www.example.com&lt;br /&gt;
&lt;br /&gt;
&amp;quot;;&lt;br /&gt;
	Socket.Send( request );&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Server ==&lt;/div&gt;</summary>
		<author><name>Ysc3839</name></author>
	</entry>
</feed>