Guidance
指路人
g.yi.org
Guidance Forums / Rapid-Q Basic / printing on IP-adress??

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
Forum List • Thread List • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. printing on IP-adress??
#1132
Posted by: qmark 2003-12-04 15:46:23
can sobmody provide code for printing on IP-address using TCP/IP protocol??
Message2. Re: printing on IP-adress??
#1133
Posted by: 2003-12-05 10:59:34
This works in HotBasic.  Notice that tcp/ip is not used, but rather it is DNS lookup.

$APPTYPE CONSOLE:$TYPECHECK ON: $SYMBOLTABLE ON
DEFLNG i,j,k,p,err
DIM Peer As SOCKET, M As MEMORY
DEFSTR LocalN,LocalIP,f$

COLOR 15: PRINT "My IP address": PRINT: COLOR 7

LocalN=Peer.GetHostName
LocalIP=Peer.GetHostIP
PRINT "Peer.GetHostName=";LocalN
PRINT "Peer.GetHostIP  =";LocalIP

LocalN=Peer.NameByAddr(LocalIP)
PRINT "Local NamebyAddr=";LocalN
PAUSE
END
Forum List • Thread List • Refresh • New Topic • Search • Previous • Next First 1 Last
掌柜推荐
 
 
¥1,390.00 ·
 
 
¥287.00 ·
 
 
¥410.00 ·
 
 
¥1,380.00 ·
 
 
¥1,080.00 ·
 
 
¥271.00 ·
© Sun 2024-11-24  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0