<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.deltaworlds.com/index.php?action=history&amp;feed=atom&amp;title=Aw_init_bind</id>
	<title>Aw init bind - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.deltaworlds.com/index.php?action=history&amp;feed=atom&amp;title=Aw_init_bind"/>
	<link rel="alternate" type="text/html" href="https://wiki.deltaworlds.com/index.php?title=Aw_init_bind&amp;action=history"/>
	<updated>2026-04-17T00:11:51Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.deltaworlds.com/index.php?title=Aw_init_bind&amp;diff=197&amp;oldid=prev</id>
		<title>Xan: Created page with &quot;{{SDK added in|version=4.1|sdk=61|world=|universe=|browser=}}  __NOTOC__   int aw_init_bind (int &lt;var&gt;build&lt;/var&gt;, unsigned long &lt;var&gt;addr&lt;/var&gt;)  ==Description== Initializes the SDK and specifies the source IP address for outbound connections.  ==Callback== None (returns immediately)  ==Notes== Specifying the source IP address is useful when you have multiple network interface cards (NIC) or a single NIC with multiple IP addresses. The source IP address must either matc...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.deltaworlds.com/index.php?title=Aw_init_bind&amp;diff=197&amp;oldid=prev"/>
		<updated>2025-04-07T19:25:42Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{SDK added in|version=4.1|sdk=61|world=|universe=|browser=}}  __NOTOC__   int aw_init_bind (int &amp;lt;var&amp;gt;build&amp;lt;/var&amp;gt;, unsigned long &amp;lt;var&amp;gt;addr&amp;lt;/var&amp;gt;)  ==Description== Initializes the SDK and specifies the source IP address for outbound connections.  ==Callback== None (returns immediately)  ==Notes== Specifying the source IP address is useful when you have multiple network interface cards (NIC) or a single NIC with multiple IP addresses. The source IP address must either matc...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{SDK added in|version=4.1|sdk=61|world=|universe=|browser=}}&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&lt;br /&gt;
 int aw_init_bind (int &amp;lt;var&amp;gt;build&amp;lt;/var&amp;gt;, unsigned long &amp;lt;var&amp;gt;addr&amp;lt;/var&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
Initializes the SDK and specifies the source IP address for outbound connections.&lt;br /&gt;
&lt;br /&gt;
==Callback==&lt;br /&gt;
None (returns immediately)&lt;br /&gt;
&lt;br /&gt;
==Notes==&lt;br /&gt;
Specifying the source IP address is useful when you have multiple network interface cards (NIC) or a single NIC with multiple IP addresses. The source IP address must either match or be within range of the IP address(es) used by a network interface on the system.&lt;br /&gt;
&lt;br /&gt;
This method or [[aw_init]] must be called once before any other methods in the API. It will do an implicit [[aw_term]] if the SDK has already been successfully initialized. Thus, there is no need to call [[aw_term]] for each additional call to this method, as there is no reference count.&lt;br /&gt;
&lt;br /&gt;
If successful then the tick count returned by [[aw_tick]] is reset to 0 and the pseudo-random number generator used by [[aw_random]] is seeded.&lt;br /&gt;
&lt;br /&gt;
==Arguments==&lt;br /&gt;
;build:AW_BUILD in Aw.h defines the build of Aw.dll (or libaw_sdk.so for Linux) it was distributed with and should be passed as the value of this argument. &lt;br /&gt;
;addr:Source IP address for outbound connections (in network byte order.) If set to 0 (0.0.0.0) then it will be the same as calling [[aw_wait]].&lt;br /&gt;
&lt;br /&gt;
==Argument attributes==&lt;br /&gt;
None&lt;br /&gt;
&lt;br /&gt;
==Return values==&lt;br /&gt;
;[[SDK Reason Codes#RC_SUCCESS|RC_SUCCESS]]:&lt;br /&gt;
;[[SDK Reason Codes#RC_VERSION_MISMATCH|RC_VERSION_MISMATCH]]:Aw.h and Aw.dll (or libaw_sdk.so for Linux) are from different builds of the SDK.&lt;br /&gt;
&lt;br /&gt;
==Returned attributes==&lt;br /&gt;
None&lt;br /&gt;
&lt;br /&gt;
==Usage==&lt;br /&gt;
 #include &amp;quot;Aw.h&amp;quot;&lt;br /&gt;
 #include &amp;quot;[[Reason.h]]&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 int main (int argc, char *argv[])&lt;br /&gt;
 {&lt;br /&gt;
   /* use 192.168.0.1 as the source for outbound connections */&lt;br /&gt;
   if ([[aw_init_bind]] (AW_BUILD, inet_addr (&amp;quot;192.168.0.1&amp;quot;)) != [[SDK Reason Codes#RC_SUCCESS|RC_SUCCESS]])&lt;br /&gt;
   {&lt;br /&gt;
     printf (&amp;quot;Build #%d of Aw.dll is required to run this bot.\n&amp;quot;, AW_BUILD);&lt;br /&gt;
     return 1;&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   /* ... */&lt;br /&gt;
   &lt;br /&gt;
   [[aw_term]] ();&lt;br /&gt;
   return 0;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
*[[SDK_Application_Structure|Application structure]]&lt;br /&gt;
*[[aw_init]]&lt;br /&gt;
*[[aw_random]]&lt;br /&gt;
*[[aw_term]]&lt;br /&gt;
*[[aw_tick]]&lt;br /&gt;
&lt;br /&gt;
[[Category: SDK Methods|I]]&lt;/div&gt;</summary>
		<author><name>Xan</name></author>
	</entry>
</feed>