<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://rsewiki.electro.dtu.dk/index.php?action=history&amp;feed=atom&amp;title=Smr_connect</id>
	<title>Smr connect - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://rsewiki.electro.dtu.dk/index.php?action=history&amp;feed=atom&amp;title=Smr_connect"/>
	<link rel="alternate" type="text/html" href="https://rsewiki.electro.dtu.dk/index.php?title=Smr_connect&amp;action=history"/>
	<updated>2026-07-04T05:43:18Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.1</generator>
	<entry>
		<id>https://rsewiki.electro.dtu.dk/index.php?title=Smr_connect&amp;diff=224&amp;oldid=prev</id>
		<title>Lvm: New page:  struct smr *smr_connect(char *hostname, int port);  Smr_connect() establishes a connection to the smr daemon, [smrd], running on host &#039;&#039;hostname&#039;&#039; at TCP/IP port &#039;&#039;port&#039;&#039;.  The default ho...</title>
		<link rel="alternate" type="text/html" href="https://rsewiki.electro.dtu.dk/index.php?title=Smr_connect&amp;diff=224&amp;oldid=prev"/>
		<updated>2008-09-29T12:21:30Z</updated>

		<summary type="html">&lt;p&gt;New page:  struct smr *smr_connect(char *hostname, int port);  Smr_connect() establishes a connection to the smr daemon, [smrd], running on host &amp;#039;&amp;#039;hostname&amp;#039;&amp;#039; at TCP/IP port &amp;#039;&amp;#039;port&amp;#039;&amp;#039;.  The default ho...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt; struct smr *smr_connect(char *hostname, int port);&lt;br /&gt;
&lt;br /&gt;
Smr_connect() establishes a connection to the smr daemon, [smrd], running on host &amp;#039;&amp;#039;hostname&amp;#039;&amp;#039; at TCP/IP port &amp;#039;&amp;#039;port&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
The default host is the machine on which the program is running - this can be specified by passing a null pointer for &amp;#039;&amp;#039;hostname&amp;#039;&amp;#039;.&lt;br /&gt;
The default port is 24901, this can be specified by passing zero for &amp;#039;&amp;#039;port&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
If a connection is established, a pointer to a [[struct smr]] structure is returned. This can be used in subsequent calls to&lt;br /&gt;
[[smr_read]] and [[smr_write]].&lt;br /&gt;
If a connection can not be established, a null pointer is returned.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Example&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
 struct smr *robot;&lt;br /&gt;
&lt;br /&gt;
 robot = smr_connect(0, 0);  /* Default host and port */&lt;br /&gt;
 if (robot == 0) {&lt;br /&gt;
   fprintf(stderr, &amp;quot;Can&amp;#039;t connect to smr\n&amp;quot;);&lt;br /&gt;
   exit(1);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
When the connection is no longer needed, it can be terminated using [[smr_disconnect]].&lt;/div&gt;</summary>
		<author><name>Lvm</name></author>
	</entry>
</feed>