GETDSTIP

From MCS Wiki AVR
(Difference between revisions)
Jump to: navigation, search
(Created page with "= <span class="f_Header">Action</span> = Returns the IP address of the peer. <span style="font-family: Arial;"> </span> <span style="font-family: Arial;"> </span>...")
 
 
Line 50: Line 50:
 
= <span class="f_Header">See also</span> =
 
= <span class="f_Header">See also</span> =
  
[http://avrhelp.mcselec.com/config_tcpip.htm CONFIG TCPIP],&nbsp;[http://avrhelp.mcselec.com/getsocket.htm GETSOCKET]&nbsp;,&nbsp;[http://avrhelp.mcselec.com/socketconnect.htm SOCKETCONNECT],&nbsp;[http://avrhelp.mcselec.com/socketstat.htm SOCKETSTAT]&nbsp;,&nbsp;[http://avrhelp.mcselec.com/tcpwrite.htm TCPWRITE],&nbsp;[http://avrhelp.mcselec.com/tcpwritestr.htm TCPWRITESTR],&nbsp;[http://avrhelp.mcselec.com/socketclose.htm CLOSESOCKET]&nbsp;,&nbsp;[http://avrhelp.mcselec.com/socketlisten.htm SOCKETLISTEN],&nbsp;[http://avrhelp.mcselec.com/getdstport.htm GETDSTPORT]
+
[[CONFIG TCPIP]], [[GETSOCKET]] , [[SOCKETCONNECT]], [[SOCKETSTAT]] , [[TCPWRITE]], [[TCPWRITESTR]], [[CLOSESOCKET]] , [[SOCKETLISTEN]], [[GETDSTPORT]]
  
 
<span style="font-family: Arial;">&nbsp;</span>
 
<span style="font-family: Arial;">&nbsp;</span>

Latest revision as of 19:31, 11 February 2013

Contents

Action

Returns the IP address of the peer.

 

 

Syntax

Result = GETDSTIP( socket)

 

 

Remarks

Result

A LONG variable that will be assigned with the IP address of the peer or destination IP address.

Socket

The socket number (0-3)

 

When you are in server mode, it might be desirable to detect the IP address of the connecting client.

You can use this for logging, security, etc.

 

The IP number MSB, is stored in the LS byte of the variable.

 

 

See also

CONFIG TCPIP, GETSOCKET , SOCKETCONNECT, SOCKETSTAT , TCPWRITE, TCPWRITESTR, CLOSESOCKET , SOCKETLISTEN, GETDSTPORT

 

 

Partial Example


Dim L as Long
L = GetdstIP(i) ' store current IP number of socket i

Languages   English Deutsch  
Personal tools
Namespaces
Variants
Actions
Navigation
In other languages
Language