mirror of
https://github.com/GeorgeMcMullen/rxIRC.git
synced 2026-01-27 20:48:33 +00:00
Compare commits
2 Commits
developmen
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c7934f2457 | ||
|
|
916e4338f1 |
182
rxirc.exec
182
rxirc.exec
@@ -1,16 +1,11 @@
|
||||
/* rxIRC
|
||||
* Internet Relay Chat client program for VM/CMS systems
|
||||
* written by Carl 'LynX' v. Loesch (loesch@informatik.uni-oldenburg.de)
|
||||
* created by Lynx (244661 at DOLUNI1) on Thursday, 14 Feb 1991
|
||||
* Credits for suggestions, code contribution, miscellaneous help go to:
|
||||
* Jose Maria Blasco, Doug Sewell, Martin Ahlborn, Jim McMaster,
|
||||
* Scott Maxell, Juan Courcoul, Rob Blais, Mike Letourneau, Grant Pair
|
||||
* (in historical order mostly). Thank y'all very much!
|
||||
*
|
||||
* Extras (Pluses) written by George McMullen
|
||||
* Thanks to Carl 'LynX' v. Loesch for his suggestions, ideas, and
|
||||
* explanations of code, which made much of the additions possible.
|
||||
*
|
||||
* requires RXSOCKET MODULE version 2 by Arty Ecock (eckcu@cunyvm.bitnet)
|
||||
*
|
||||
* Copyright (C)1991,2,3,4 by LynX & CvO University Oldenburg, Germany
|
||||
@@ -19,7 +14,7 @@
|
||||
* Warning: Changing the code to display fake user information is
|
||||
* considered an offense by many IRC administrators!
|
||||
*
|
||||
*/ progname='rxIRC'; vers='2.2 (GM Branch)'; trace 'O'
|
||||
*/ progname='rxIRC'; vers='2.1'; trace 'O'
|
||||
address "COMMAND"; signal on HALT; "VMFCLEAR"
|
||||
cmds='AWAY AWAIT ADMIN CHANNEL CONNECT DEOP DIE HASH INFO ISON JOIN KICK',
|
||||
'KILL LIST LINKS LUSERS MODE MAIL MOTD NAMES NICK NOTICE NOTE OPER PASS',
|
||||
@@ -31,9 +26,6 @@
|
||||
v.=; al.=; varnames=; aliasnames=; cmdchar=; userinfo=; sourcing=0
|
||||
have_rxwt=0; who_empty=0; catmode=0; catlist=; abortsource=0; skiplines=0
|
||||
nflist=; nfhere=; nfcatch=0
|
||||
jumpcoms=0;sourcenum=0;numons=0;display='display'
|
||||
call SET 'display On'
|
||||
|
||||
"EXECIO * CP (STEM PF. STRING QUERY PF"
|
||||
do i=1 to pf.0
|
||||
a=word(pf.i,2)
|
||||
@@ -45,7 +37,7 @@
|
||||
"CP TERM CHARDEL OFF"
|
||||
"CP TERM LINESIZE 130"
|
||||
sock=; buffer=; alphalo=xrange('a','z'); alphahi=xrange('A','Z')
|
||||
lf='25'x; cr='0d'x; msa='01'x; rev='02'x; beep='2fx; undl='32'x
|
||||
lf='25'x; cr='0d'x; msa='01'x; rev='02'x; beep='2f'x; undl='32'x
|
||||
bold='1f'x; hi='1de8'x; lo='1d60'x; yo='1d44'x
|
||||
nice.=; u@n.=; via.=;
|
||||
realname=; servername=;
|
||||
@@ -164,6 +156,7 @@
|
||||
if rc/=0 then call BYE "nonblocking i/o:" etc
|
||||
myurl="http://"hostname"."domain":"wwwport"/"
|
||||
end
|
||||
|
||||
call S progname||hi||vers||yo"- You are" ircnick "("ircname")"
|
||||
call S "Logging is" onoff.log"; Audible bells are",
|
||||
onoff.loud"; Quiet ignore is" onoff.quiet
|
||||
@@ -187,38 +180,7 @@
|
||||
do forever
|
||||
if index(buffer, lf)=0 then leave
|
||||
parse var buffer in (lf) buffer
|
||||
see=PARSE(strip(in,,cr))
|
||||
parse var see com sndr' ### 'eye
|
||||
call OUT eye
|
||||
if sndr/='' & sndr/=servername & pos(sndr,v.0)^=0 then
|
||||
call SET 0 sndr
|
||||
see=com
|
||||
do i= 0 to 9
|
||||
see=see v.i
|
||||
end
|
||||
upper see
|
||||
if numons>0 then do test=1 to numons
|
||||
parse var on.test look '::' com
|
||||
upper look
|
||||
do exam=1 to words(look)
|
||||
single=word(look,exam)
|
||||
if single=word(see,exam)|single="*" then iterate
|
||||
if right(single,1)="*" then
|
||||
if pos(left(single,length(single)-1),word(see,exam))=1 then
|
||||
iterate
|
||||
if left(single,1)="*" then
|
||||
if right(single,1)="*" then
|
||||
if pos(substr(single,2,length(single)-2),word(see,exam)),
|
||||
>=1 then iterate
|
||||
else nop
|
||||
else
|
||||
if lastpos(right(single,length(single)-1),word(see,exam)),
|
||||
= length(word(see,exam))-(length(single)-2)&,
|
||||
length(word(see,exam))-(length(single)-2)^=0 then iterate
|
||||
leave
|
||||
end
|
||||
if exam=words(look)+1 then call SHELL com
|
||||
end
|
||||
call OUT PARSE(strip(in,,cr))
|
||||
end
|
||||
end
|
||||
when type = 'CONS' then if data/='' then do
|
||||
@@ -293,7 +255,7 @@
|
||||
PARSE:
|
||||
parse arg a
|
||||
if loud & pos(beep,a)/=0 then "BEEP"
|
||||
tu=; a=translate(a,"%"||beepch||"_",rev||beep||undl); bm=;
|
||||
tu=; a=translate(a,"%"||beepch||"_",rev||beep||undl)
|
||||
i=1; j=0; do forever; i=index(a,bold,i)
|
||||
if i=0 then leave
|
||||
if j=0 then a=insert(hi,a,i)
|
||||
@@ -327,10 +289,7 @@ PARSE:
|
||||
when m='KICK' then tu='***' s 'kicks' f 'off channel' e '('g')'
|
||||
when m='KILL' then tu='You were killed by' s subword(g,2)
|
||||
when m='MODE' then tu='Mode change:' s 'sets' f 'on' e||g
|
||||
when m='MSG' then do
|
||||
tu='<'s'>' g
|
||||
m='PUBLIC'
|
||||
end
|
||||
when m='MSG' then tu='<'s'>' g
|
||||
when m='NICK' then tu='***' s 'is now known as' e||g
|
||||
when m='NOTICE' then select
|
||||
when s='' | s=servername then do
|
||||
@@ -354,32 +313,14 @@ PARSE:
|
||||
if ^quiet then call SEND('NOTICE' s ':'ignore_reply)
|
||||
return ''; end
|
||||
else do
|
||||
if CTCP(1 g) then do
|
||||
tu='*'s'*' g
|
||||
m='MSG'
|
||||
end
|
||||
else do
|
||||
m='CTCP'
|
||||
parse var g . (msa) bm g (msa) .
|
||||
bm=s bm g
|
||||
end
|
||||
if CTCP(1 g) then tu='*'s'*' g
|
||||
lastsender=s
|
||||
end
|
||||
end
|
||||
else if ^FINDM(omit,s) & ^FINDM(omit,sad) then do
|
||||
if CTCP(0 g) then do
|
||||
m='CTCP'
|
||||
parse var g . (msa) bm g (msa) .
|
||||
bm=s bm g
|
||||
end
|
||||
if translate(e)=target then then if CTCP(0 g) then do
|
||||
yu='<'s'>' g
|
||||
m='PUBLIC'
|
||||
end
|
||||
otherwise if CTCP(0 g) then do
|
||||
tu='<'s':'e'>' g
|
||||
m='PUBLIC'
|
||||
end
|
||||
else if ^FINDM(omit,s) & ^FINDM(omit,sad) then
|
||||
if CTCP(0 g) then do
|
||||
if translate(e)=target then tu='<'s'>' g
|
||||
else tu='<'s':'e'>' g
|
||||
end
|
||||
end
|
||||
when m='QUIT' then tu='Signoff by' s '('g')'
|
||||
@@ -402,20 +343,14 @@ PARSE:
|
||||
when m='314' then do; parse var f ni ui no .
|
||||
tu=ni 'was' ui'@'no '('g')'; end
|
||||
when m='312' then tu='via' word(f,2) '('g')'
|
||||
when m='315' then if who_empty then do
|
||||
bm='No matches for /who'
|
||||
call S bm
|
||||
end
|
||||
when m='315' then if who_empty then call S 'No matches for /who'
|
||||
when m='319' then tu='on channels:' g
|
||||
when m='317' then tu='apparently idle' word(f,2)/60 'minutes'
|
||||
when m='322' then do
|
||||
parse var f ch n .
|
||||
if ch/='*' & substr(ch,2,1)/='27'x then do
|
||||
if catmode then do; if n>4 then catlist=ch catlist; end
|
||||
else if listall | n>7 then do
|
||||
bm=left(ch,13) left(n,4)g
|
||||
call OUT left(ch,13) left(n,4)g
|
||||
end
|
||||
else if listall | n>7 then call OUT left(ch,13) left(n,4)g
|
||||
end; end
|
||||
when m='323' then do
|
||||
if catmode then do
|
||||
@@ -434,14 +369,10 @@ PARSE:
|
||||
else if (ch/='*' & a>length(ch)) then
|
||||
k=lo||ch||hi||n||lo||copies(' ',a-length(ch)-1)us"@"no
|
||||
else k=hi||n||lo||copies(' ',a)us"@"no
|
||||
bm=st ni ch us no n
|
||||
call S left(st,3)yo||left(ni,9)k
|
||||
end
|
||||
when m='353' then do; ch=word(f,2); a=words(g)
|
||||
if ch/='*' & (a>6 | translate(ch)=target) then do
|
||||
bm=left(ch,15)||g
|
||||
call OUT hi||left(ch,15)yo||g
|
||||
end
|
||||
if ch/='*' & (a>6 | translate(ch)=target) then call OUT hi||left(ch,15)yo||g
|
||||
end
|
||||
when m='313'|m='364' then tu=f g
|
||||
when m='004'|m='318'|m='321'|m='365'|m='366'|m='406' then nop
|
||||
@@ -456,13 +387,7 @@ PARSE:
|
||||
if s/="" & s/=servername then tu='('s')' tu
|
||||
if numb then tu='{'m'}' tu
|
||||
end
|
||||
if bm=''&b/='' then bm=tu
|
||||
do jjj=1 to 10
|
||||
if word(bm,jjj)^='' then call SET jjj-1 word(bm,jjj)
|
||||
else call UNSET jjj-1
|
||||
if jjj>=10 then leave
|
||||
end
|
||||
return m s '###' translate(tu,"@",msa)
|
||||
return translate(tu,"@",msa)
|
||||
|
||||
VAR:
|
||||
parse arg x
|
||||
@@ -496,26 +421,11 @@ SET:
|
||||
z=word(varnames,i); call S '$('z') is "'v.z'"'
|
||||
end
|
||||
else do
|
||||
parse var z vn vv
|
||||
if b='' then call S 'Variable' vn 'has the value "'v.vv'"'
|
||||
else do; v.vn=vv; if find(varnames,vn)=0 then varnames=vn varnames; end
|
||||
parse var z a b
|
||||
if b='' then call S 'Variable' a 'has the value "'v.a'"'
|
||||
else do; v.a=b; if find(varnames,a)=0 then varnames=a varnames; end
|
||||
end
|
||||
return
|
||||
|
||||
UNSET:
|
||||
parse arg z etc
|
||||
if z='' then do;call S "Deleting all set variables..."
|
||||
do i=1 to words(varnames)
|
||||
z=word(varnames,i); v.z=;
|
||||
end;varnames=;end
|
||||
else do
|
||||
nvn=' '
|
||||
do i=1 to words(varnames)
|
||||
if z=word(varnames,i) then nop
|
||||
else nvn=nvn word(varnames,i);end
|
||||
v.z=;varnames=nvn
|
||||
end
|
||||
return
|
||||
|
||||
EDIT:
|
||||
parse arg in
|
||||
@@ -528,11 +438,10 @@ EDIT:
|
||||
else if left(in,2)=cmdchar' ' then call SEND 'PRIVMSG' target ':'substr(in,3)
|
||||
else call SHELL substr(in,2)
|
||||
return
|
||||
|
||||
|
||||
SHELL:
|
||||
parse arg lin
|
||||
if abbrev('ALIAS', translate(word(lin,1)), 2) then do
|
||||
lin=strip(lin)
|
||||
parse var lin . name lin
|
||||
if name='' then do i=1 to words(aliasnames)
|
||||
name=word(aliasnames,i); call S name': "'al.name'"'
|
||||
@@ -545,18 +454,6 @@ SHELL:
|
||||
end
|
||||
return
|
||||
end
|
||||
if abbrev('ON', translate(word(lin,1)), 2) then do
|
||||
lin=strip(lin)
|
||||
parse var lin . lin
|
||||
if lin=''&numons>0 then do i=1 to numons
|
||||
call S i'- ON: "'on.i'"'
|
||||
end
|
||||
else if lin\='' then do
|
||||
numons=numons+1
|
||||
on.numons=lin
|
||||
end
|
||||
return
|
||||
end
|
||||
do while lin/=''
|
||||
if left(lin,1)='*' then return
|
||||
parse var lin one '15'x lin
|
||||
@@ -576,11 +473,6 @@ SHELL:
|
||||
sb=sb||k||VAR(x)
|
||||
end
|
||||
parse var sb com par '::' next
|
||||
do while jumpcoms>0 & next ^=''
|
||||
parse var next com par '::' next
|
||||
jumpcoms = jumpcoms-1
|
||||
end
|
||||
jumpcoms=0
|
||||
upper com
|
||||
if next/='' then lin=next||'15'x||lin
|
||||
if find(lc, com)=0 then lc=com lc
|
||||
@@ -622,7 +514,6 @@ COMMAND:
|
||||
end
|
||||
end
|
||||
when abbrev('INTERPRET',q,3) then call INTERP r
|
||||
when abbrev('ASSIGN',q,3) then call ASSIGN r
|
||||
when abbrev('INVITE',q,1) then do
|
||||
if words(r)=1 & target/=0 then out='INVITE' r target
|
||||
else out='INVITE' r
|
||||
@@ -632,26 +523,11 @@ COMMAND:
|
||||
when abbrev('NICKNAME',q,1) then if r='' then out='WHOIS' ircnick
|
||||
else do; out='NICK' r; ircnick=r; capnick=translate(r); end
|
||||
when q='NF'|abbrev('NOTIFY',q,4) then call NOTIFY r
|
||||
when abbrev('SEND',q,4) then if r='' then do
|
||||
call S "Send what?"
|
||||
end
|
||||
else do
|
||||
call S "Sent command ("r")."
|
||||
call SEND(r)
|
||||
end
|
||||
when abbrev('QUOTE',q,4) then if r='' then do
|
||||
call S "Quote what?"
|
||||
end
|
||||
else do
|
||||
call SEND(r)
|
||||
end
|
||||
when left(q,2)='PF' then 'CP SET' q r
|
||||
when abbrev('REPLY',q,1) then call QUERY lastsender
|
||||
when abbrev('SERVER',q,1) then call CONNECT r
|
||||
when q='SET' then call SET r
|
||||
when abbrev('UNSET',q,3) then call UNSET r
|
||||
when q='SKIP' & sourcing then if datatype(r,'w') then skiplines=r
|
||||
when q='JUMP' then if datatype(r,'w') then jumpcoms=r
|
||||
when abbrev('SOURCE',q,2) then call SOURCE r
|
||||
when abbrev('STATUS',q,1) then do; out='WHOIS' ircnick
|
||||
call OUT 'Target:' target'; Query:' query'; Invitation:' invitation'; Last sender:' lastsender'; Last joined:' lastjoin
|
||||
@@ -780,11 +656,9 @@ LOGGING:
|
||||
return
|
||||
|
||||
S:
|
||||
parse arg k
|
||||
if translate(v.display)/='OFF' then say k
|
||||
parse arg k; say k; if log then writelog k
|
||||
if logevent/=0 then do
|
||||
curll=curll+1; ll.curll=k; logevent=0; k=curll-50; ll.k=; end
|
||||
if log then writelog k
|
||||
return
|
||||
|
||||
OUT:
|
||||
@@ -845,7 +719,7 @@ CTCP:
|
||||
when ctcp="USERINFO" then call MSAREPLY "USERINFO" userinfo
|
||||
when ctcp="VERSION" then
|
||||
call MSAREPLY "VERSION" progname vers "VM/CMS",
|
||||
":Beta Version of Improved rxIRC - The Survival package for VM-struck humans"
|
||||
":Survival package for VM-struck humans"
|
||||
otherwise if fla=1 then call MSAREPLY "ERRMSG Huh? Can't do" ctcp
|
||||
end
|
||||
return 0
|
||||
@@ -1098,7 +972,6 @@ TELL:
|
||||
|
||||
SOURCE:
|
||||
arg sfn, sfl
|
||||
sourcenum=sourcenum+1
|
||||
if sfn='' then do
|
||||
call S "You must specify a file to /source"
|
||||
return -1
|
||||
@@ -1112,13 +985,6 @@ SOURCE:
|
||||
'MAKEBUF'; 'EXECIO * DISKR' sfn '(FIFO FINIS'; skiplines=0;
|
||||
do queued(); sourcing=1
|
||||
parse pull l; if abortsource then iterate
|
||||
if right(strip(l),2)='::' then
|
||||
ll=ll||l
|
||||
else do
|
||||
ll=ll||l
|
||||
call SHELL strip(ll)
|
||||
ll=''
|
||||
end
|
||||
if skiplines=0 then call SHELL strip(l)
|
||||
else skiplines=skiplines-1
|
||||
end
|
||||
@@ -1151,11 +1017,6 @@ INTERP:
|
||||
signal on SYNTAX; INTERPRET(statement); signal off SYNTAX
|
||||
return rc
|
||||
|
||||
ASSIGN:
|
||||
parse arg asto asfrom
|
||||
signal on SYNTAX; INTERPRET(statement); signal off SYNTAX
|
||||
return rc
|
||||
|
||||
NOTIFY:
|
||||
arg a
|
||||
do i=1 to words(a)
|
||||
@@ -1223,4 +1084,3 @@ WRITEFILE:
|
||||
DROPIT:
|
||||
'DROPBUF'
|
||||
return
|
||||
|
||||
|
||||
BIN
vm.modules/rexxwait.vmarc
Normal file
BIN
vm.modules/rexxwait.vmarc
Normal file
Binary file not shown.
101
vm.modules/rxsocket.list
Normal file
101
vm.modules/rxsocket.list
Normal file
@@ -0,0 +1,101 @@
|
||||
Filename Filetype FM Format LRecL Date Time Compressed Size
|
||||
EXTINT52 ASSEMBLE W1 F 80 1993-02-17 11:55:28 6561
|
||||
RXSOCKET $PACKAGE W1 V 72 1994-01-10 17:10:36 2668
|
||||
EXTINT52 MODULE W1 F 1360 1993-02-17 11:55:18 1228
|
||||
RXWSAMPL TIMEFILE W1 V 57 1993-02-17 11:55:04 431
|
||||
RXWSAMPL EXEC W1 V 73 1994-06-06 21:11:30 2866
|
||||
REXXWAIT MODULE W1 V -11456 1994-04-15 07:01:03 33148
|
||||
WNG HELPEVNT W1 V 79 1994-01-10 17:04:48 911
|
||||
WAIT HELPEVNT W1 V 79 1994-01-10 17:04:47 831
|
||||
TIME HELPEVNT W1 V 79 1994-01-10 17:04:46 1231
|
||||
SMSG HELPEVNT W1 V 79 1994-01-10 17:04:45 991
|
||||
OMSG HELPEVNT W1 V 79 1994-01-10 17:04:44 1551
|
||||
MSG HELPEVNT W1 V 79 1994-01-10 17:04:43 911
|
||||
MAIL HELPEVNT W1 V 79 1994-01-10 17:04:42 1071
|
||||
FILE HELPEVNT W1 V 79 1994-01-10 17:04:40 1391
|
||||
CONS HELPEVNT W1 V 79 1994-01-10 17:04:37 911
|
||||
ALL HELPEVNT W1 V 79 1994-01-10 17:04:36 751
|
||||
EVNTHND HELPMENU W1 V 75 1994-01-10 17:04:48 991
|
||||
WAIT HELPREXX W1 V 79 1994-01-10 17:05:06 1151
|
||||
SETVALUE HELPREXX W1 V 79 1994-01-10 17:05:03 911
|
||||
RESETVAL HELPREXX W1 V 79 1994-01-10 17:05:03 671
|
||||
QUERYVAL HELPREXX W1 V 79 1994-01-10 17:05:02 991
|
||||
CTABLE HELPREXX W1 V 79 1994-01-10 17:04:59 1151
|
||||
CTYPE HELPREXX W1 V 79 1994-01-10 17:05:00 591
|
||||
EC2AC HELPREXX W1 V 79 1994-01-10 17:05:01 511
|
||||
AC2EC HELPREXX W1 V 79 1994-01-10 17:04:58 511
|
||||
REXXWAIT HELPMENU W1 V 75 1994-01-10 17:04:51 1071
|
||||
REXXWAIT MANUAL W1 V 110 1994-04-15 07:00:52 45429
|
||||
REXXWAIT MEMO W1 V 76 1993-09-15 09:30:55 4419
|
||||
RXSOCKET TCPXLATE W1 V 59 1993-02-17 11:53:48 1551
|
||||
RXSOCKET TCPXLBIN W1 F 256 1993-02-17 11:53:59 757
|
||||
RSCLIENT EXEC W1 V 72 1993-02-17 11:53:29 2881
|
||||
RSSERVER EXEC W1 V 72 1993-02-17 11:53:18 4321
|
||||
RXSSAMPL EXEC W1 V 73 1993-02-17 11:52:50 3210
|
||||
RESOLVE EXEC W1 V 60 1993-02-17 11:52:33 1038
|
||||
FINGER EXEC W1 V 82 1995-03-27 08:58:48 2582
|
||||
DAYTIME EXEC W1 V 82 1993-02-17 12:19:28 2262
|
||||
ARCHIE EXEC W1 V 94 1995-06-09 17:38:17 7702
|
||||
RXSOCKET MODULE W1 V -28648 1994-07-01 09:55:53 25201
|
||||
RXSOCKET MEMO W1 V 74 1993-02-17 21:23:48 8600
|
||||
RXSOCKET MANUAL W1 V 96 1993-06-04 10:23:03 36004
|
||||
RXSOCKET SCRIPT W1 V 133 1994-04-20 10:44:15 34194
|
||||
IMMCMD HELPEVNT W1 V 79 1994-01-12 08:50:31 991
|
||||
HOLIDAY HELPEVNT W1 V 79 1994-01-12 08:50:11 1151
|
||||
SOCKET HELPEVNT W1 V 79 1994-01-10 17:04:45 1151
|
||||
SOCKET HELPREXX W1 V 79 1994-01-10 17:05:04 991
|
||||
REXXSOCK HELPMENU W1 V 73 1994-01-10 17:04:50 671
|
||||
RXS028W HELPMSG W1 V 76 1994-01-10 17:04:57 674
|
||||
RXS012E HELPMSG W1 V 77 1994-01-10 17:04:56 514
|
||||
RXS008E HELPMSG W1 V 78 1994-01-10 17:04:55 674
|
||||
RXS004E HELPMSG W1 V 79 1994-01-10 17:04:52 674
|
||||
WRITE HELPRXSO W1 V 78 1994-01-10 17:06:12 1231
|
||||
VERSION HELPRXSO W1 V 78 1994-01-10 17:06:11 1071
|
||||
TERMINAT HELPRXSO W1 V 79 1994-01-10 17:06:10 1311
|
||||
TAKESOCK HELPRXSO W1 V 78 1994-01-10 17:06:09 1631
|
||||
SOCKETSE HELPRXSO W1 V 79 1994-01-10 17:06:00 2591
|
||||
SOCKET HELPRXSO W1 V 77 1994-01-10 17:05:59 1631
|
||||
SHUTDOWN HELPRXSO W1 V 78 1994-01-10 17:05:59 1151
|
||||
SETSOCKO HELPRXSO W1 V 78 1994-01-10 17:05:58 1871
|
||||
SENDTO HELPRXSO W1 V 79 1994-01-10 17:05:57 1471
|
||||
SEND HELPRXSO W1 V 77 1994-01-10 17:05:56 1391
|
||||
SELECT HELPRXSO W1 V 78 1994-01-10 17:05:55 1791
|
||||
RESOLVE HELPRXSO W1 V 77 1994-01-10 17:05:53 1551
|
||||
RECVFROM HELPRXSO W1 V 78 1994-01-10 17:05:52 1711
|
||||
RECV HELPRXSO W1 V 78 1994-01-10 17:05:51 1551
|
||||
READ HELPRXSO W1 V 77 1994-01-10 17:05:49 1471
|
||||
LISTEN HELPRXSO W1 V 79 1994-01-10 17:05:48 1151
|
||||
IOCTL HELPRXSO W1 V 78 1994-01-10 17:05:46 1631
|
||||
INITIALI HELPRXSO W1 V 79 1994-01-10 17:05:45 1711
|
||||
GIVESOCK HELPRXSO W1 V 78 1994-01-10 17:05:45 1551
|
||||
GETSOCKO HELPRXSO W1 V 78 1994-01-10 17:05:44 1951
|
||||
GETSOCKN HELPRXSO W1 V 79 1994-01-10 17:05:32 1151
|
||||
GETSERVB HELPRXSO W1 V 74 1994-01-10 17:05:32 1231
|
||||
GETPROTO HELPRXSO W1 V 73 1994-01-10 17:05:31 1071
|
||||
GETPEERN HELPRXSO W1 V 79 1994-01-10 17:05:29 1071
|
||||
GETHOSTN HELPRXSO W1 V 76 1994-01-10 17:05:28 991
|
||||
GETHOSTI HELPRXSO W1 V 79 1994-01-10 17:05:26 991
|
||||
GETHOSTB HELPRXSO W1 V 77 1994-01-10 17:05:25 1711
|
||||
GETDOMAI HELPRXSO W1 V 76 1994-01-10 17:05:24 1071
|
||||
GETCLIEN HELPRXSO W1 V 78 1994-01-10 17:05:23 1311
|
||||
FCNTL HELPRXSO W1 V 78 1994-01-10 17:05:22 1391
|
||||
CONNECT HELPRXSO W1 V 79 1994-01-10 17:05:21 1631
|
||||
CLOSE HELPRXSO W1 V 78 1994-01-10 17:05:19 911
|
||||
BIND HELPRXSO W1 V 78 1994-01-10 17:05:18 1471
|
||||
ACCEPT HELPRXSO W1 V 79 1994-01-10 17:05:17 1471
|
||||
RXSOCKET HELPTASK W1 V 80 1994-01-10 17:06:13 2191
|
||||
RXSOCKET HOWMVS W1 F 80 1994-06-06 21:17:51 751
|
||||
RXSOCKET TXTMVS W1 F 80 1994-03-14 14:10:24 57720
|
||||
WRITESRV EXEC W1 V 115 1993-11-29 12:44:49 3311
|
||||
TACACSD EXEC W1 V 77 1995-06-09 17:35:30 5358
|
||||
RACROUTE ASSEMBLE W1 F 1024 1994-09-27 14:08:04 8185
|
||||
RACROUTE MODULE W1 V 2120 1993-11-08 14:30:55 1684
|
||||
TALK EXEC W1 V 93 1994-12-07 14:22:05 10087
|
||||
EC2AC EXEC W1 F 80 1994-08-17 12:39:07 958
|
||||
AC2EC EXEC W1 F 80 1994-08-17 12:22:55 958
|
||||
WRITE EXEC W1 V 115 1994-02-16 13:53:35 4111
|
||||
NFTP EXEC W1 V 95 1993-10-20 16:20:40 4594
|
||||
TALKD EXEC W1 V 130 1993-07-17 11:11:04 4620
|
||||
SYSLOGD EXEC W1 V 78 1995-06-09 17:41:32 3708
|
||||
TCPLOGD NAMES W1 V 75 1995-06-09 17:47:27 985
|
||||
NFSUTIL EXEC W1 F 80 1995-06-09 17:48:24 20226
|
||||
609
vm.modules/rxsocket.read-me
Normal file
609
vm.modules/rxsocket.read-me
Normal file
@@ -0,0 +1,609 @@
|
||||
TCP/IP Socket support function for REXX (Rxsocket & Rexxwait)
|
||||
Arty Ecock <eckcu@cunyvm.cuny.edu>
|
||||
CUNY
|
||||
|
||||
|
||||
Last revised: 17 February 1993
|
||||
|
||||
This file contains tips for converting applications from
|
||||
RXSOCKET Version 1 to RXSOCKET Version 2.
|
||||
|
||||
A word about defaults:
|
||||
----------------------
|
||||
|
||||
RXSOCKET Version 2 reads the TCPIP DATA file in order to establish
|
||||
non-default values for such things as the TCP/IP server userid,
|
||||
the Name Server IP addresses to use for name resolution, the local
|
||||
Domain Origin, Resolver Timeout value, etc.
|
||||
|
||||
If the TCPIP DATA file is *NOT* available, the following defaults are
|
||||
used:
|
||||
|
||||
TCPIPuserid TCPIP
|
||||
HostName (the value returned from the TCPIP server)
|
||||
DomainOrigin (null string)
|
||||
NSinterAddr 14.0.0.0
|
||||
NSportAddr 53
|
||||
ResolveVia UDP
|
||||
ResolverTimeout 30
|
||||
ResolverUdpRetries 1 (not fully supported; soon, though)
|
||||
|
||||
The value of "TCPIPuserid" can be overridden by specifying a value for
|
||||
the fourth argument of an "Initialize" subfunction:
|
||||
|
||||
Parse Value Socket('Initialize', 'Test', 40, 'TCPIPTST') With rc ...
|
||||
-or-
|
||||
Parse Value Socket('Initialize', 'Test', ,'TCPIPTST') With rc ...
|
||||
|
||||
RXSOCKET Version 2 uses a specific hierarchy when searching for an
|
||||
appropriate set of ASCII/EBCDIC translate tables. Using the example
|
||||
"Initialize" subfunction above, the following translate tables are
|
||||
sought: (the first table found is used)
|
||||
|
||||
1) "TEST TCPXLBIN *". Note that the socket-set name "Test" has
|
||||
been upper-cased.
|
||||
|
||||
2) If not found, RXSOCKET searches for "userid TCPXLBIN *", where
|
||||
"userid" is the VM userid using RXSOCKET.
|
||||
|
||||
3) If not found, RXSOCKET searches for "STANDARD TCPXLBIN *".
|
||||
(STANDARD TCPXLBIN is usually supplied with VM TCP/IP on the
|
||||
TCPMAINT 592 minidisk.)
|
||||
|
||||
4) Then "RXSOCKET TCPXLBIN *". These tables are *IDENTICAL* to
|
||||
the tables that are hard-coded into RXSOCKET.
|
||||
|
||||
RXSOCKET TCPXLATE contains the source version of these translate
|
||||
tables. This file is converted to RXSOCKET TCPXLBIN by using the
|
||||
CONVXLAT MODULE supplied with TCP/IP (on the TCPMAINT 592 disk).
|
||||
|
||||
RXSOCKET TCPXLATE and STANDARD TCPXLATE can be used as templates
|
||||
for cistomizing your own translate tables.
|
||||
|
||||
5) If none of these tables are found, an internal set of ASCII/EBCDIC
|
||||
translate tables are used.
|
||||
|
||||
STANDARD TCPXLBIN is usually suitable for most applications. Problems
|
||||
with square brackets, for example, can usually be overcome by creating
|
||||
a customized TCPXLBIN file.
|
||||
|
||||
|
||||
A word about the format of the new result string:
|
||||
-------------------------------------------------
|
||||
|
||||
In RXSOCKET, the result of a SOCKET function call is always a character
|
||||
string. This string usually contains several items. The first item
|
||||
will always be a return code value. A return code of "0" indicates that
|
||||
the function call completed without error. The remaining items in the
|
||||
result string contain function-specific values.
|
||||
|
||||
Example 1:
|
||||
Parse Value Socket('Initialize', 'Test') With rc sockset count server
|
||||
|
||||
might yield:
|
||||
|
||||
rc = "0" Return code "0" (Success)
|
||||
sockset = "Test" The name of this socket-set
|
||||
count = "40" Default number of sockets available
|
||||
server = "TCPIP" Default TCP/IP server userid
|
||||
|
||||
Example 2:
|
||||
Call Socket 'Initialize', 'Test'
|
||||
Parse Var result rc sockset count server
|
||||
|
||||
should yield the same values. (Remember that the "result" variable
|
||||
is set by REXX when you "Call" a REXX function.)
|
||||
|
||||
If the return code value is other than "0", an error is indicated. In
|
||||
such a case, the second item in the result string corresponds to an
|
||||
"Errno Value" as described in Chapter 3 of the IBM TCP/IP Programmer's
|
||||
Reference manual. "EBADF", "EWOULDBLOCK", "EFAULT", "ENOPROTOOPT" and
|
||||
"EINVALIDRXSOCKETCALL" are a few of the possible values. The remaining
|
||||
items (words) of the result string describe the error in more
|
||||
understandable terms (I hope).
|
||||
|
||||
Examples:
|
||||
"9 EBADF Bad file number"
|
||||
"35 EWOULDBLOCK Operation would block"
|
||||
"36 EINPROGRESS Operation now in progress"
|
||||
"60 ETIMEDOUT Connection timed out"
|
||||
"61 ECONNREFUSED Connection refused"
|
||||
|
||||
Note that rc=36 is not necessarily an error condition.
|
||||
"EINPROGRESS" may be returned for certain operations on non-blocking
|
||||
sockets.
|
||||
|
||||
See Chapter 3 of the IBM TCP/IP Programmer's Reference manual for
|
||||
information on which "Errno Values" correspond to which socket calls.
|
||||
|
||||
Thus, you must take care when parsing the result of a RXSOCKET
|
||||
subfunction. Using a trailing "." on a "Parse" statement may cause
|
||||
you to lose the descriptive text in the case of an error.
|
||||
|
||||
Example 1:
|
||||
Parse Value Socket('Close', socket) With rc .
|
||||
|
||||
If "rc" was not "0" then the "Errno Value" and descriptive text of
|
||||
the error will be lost.
|
||||
|
||||
Example 2:
|
||||
Parse Value Socket('Close', socket) With rc rest
|
||||
|
||||
In this case, the "rest" variable will contain both
|
||||
"Errno Value" and descriptive text when rc is not "0".
|
||||
|
||||
Example 3:
|
||||
Parse Value Socket('Close', socket) With result
|
||||
Parse Var result rc .
|
||||
If rc^=0 Then Do
|
||||
Parse Var result errno errno_value errno_text
|
||||
...
|
||||
End
|
||||
|
||||
-or-
|
||||
|
||||
Call Socket 'Close', socket
|
||||
Parse Var result rc .
|
||||
If rc^=0 Then Do
|
||||
Parse Var result errno errno_value errno_text
|
||||
...
|
||||
End
|
||||
|
||||
This is fine if you like to use many "Parse" statements.
|
||||
|
||||
Example 4:
|
||||
Parse Value Socket('Close', socket) With result
|
||||
If Word(result,1)^=0 Then Do
|
||||
Say TcpError("Error during Close")
|
||||
Call Exit
|
||||
End
|
||||
|
||||
-or-
|
||||
|
||||
Parse Value Socket('Close', socket) With rc .
|
||||
If rc^=0 Then Do
|
||||
Say TcpError("Error during Close")
|
||||
Call Exit
|
||||
End
|
||||
|
||||
The former is nice, but the latter is my personal favorite.
|
||||
The "TcpError" call in this example would yield:
|
||||
|
||||
"Error during Close:" errno_text
|
||||
|
||||
where "errno_text" is the descriptive text associated with the
|
||||
errno value.
|
||||
|
||||
Example:
|
||||
"Error during Close: Bad file number"
|
||||
|
||||
There's also less parsing, fuss, and mess with this example.
|
||||
|
||||
|
||||
Comparison of RXSOCKET Version 2 functions to Version 1
|
||||
-------------------------------------------------------
|
||||
|
||||
The Version 2 function and result string will be listed first,
|
||||
followed by the Version 1 function call.
|
||||
|
||||
|
||||
function: Socket('Initialize', subtaskid, <maxdesc>, <serverid>)
|
||||
result: rc subtaskid maxdesc serverid
|
||||
|
||||
Version1: rc = Socket('Initialize', subtaskid, serverid, maxdesc)
|
||||
|
||||
Note: "maxdesc" and "serverid" have swapped places in
|
||||
RXSOCKET Version 2.
|
||||
"rc" is no longer set to the "maxdesc" value.
|
||||
|
||||
|
||||
function: Socket('Accept', socket)
|
||||
result: rc newsocket name
|
||||
|
||||
Version1: rc = Socket('Accept', socket, name)
|
||||
|
||||
Note: "name" has been moved into the result string.
|
||||
"name" is now returned as "AF_INET port nnn.nnn.nnn.nnn".
|
||||
"rc" is no longer set to the "newsocket" number.
|
||||
|
||||
|
||||
function: Socket('Bind', socket, name)
|
||||
result: rc
|
||||
|
||||
Version1: rc = Socket('Bind', socket, name)
|
||||
|
||||
Note: "name" is now specified as "AF_INET port ipaddr|hostname"
|
||||
|
||||
Examples:
|
||||
"AF_INET INPORT_ANY CUNYVM"
|
||||
"AF_INET 123 CUNYVM.CUNY.EDU"
|
||||
"AF_INET 0 CUNYVM.CUNY.EDU"
|
||||
"AF_INET 42 128.228.1.2"
|
||||
"AF_INET 12 INADDR_ANY"
|
||||
"AF_INET"
|
||||
"AF_INET 77"
|
||||
"AF_INET INPORT_ANY INADDR_ANY"
|
||||
"AF_INET INPORT_ANY ANY"
|
||||
"AF_INET ANY ANY"
|
||||
"AF_INET 23 LOOPBACK"
|
||||
"AF_INET INPORT_ANY INADDR_BROADCAST"
|
||||
"AF_INET INPORT_ANY BROADCAST"
|
||||
|
||||
You get the idea :-)
|
||||
|
||||
|
||||
function: Socket('Close', socket)
|
||||
result: rc
|
||||
|
||||
Version1: rc = Socket('Close', socket)
|
||||
|
||||
|
||||
function: Socket('Connect', socket, name)
|
||||
result: rc
|
||||
|
||||
Version1: rc = Socket('Connect', socket, name)
|
||||
|
||||
Note: "name" is now specified as "AF_INET port ipaddr|hostname".
|
||||
|
||||
|
||||
function: Socket('Fcntl', socket, cmd, <data>)
|
||||
result: rc <data>
|
||||
|
||||
Version1: rc = Socket('Fcntl', socket, cmd, data)
|
||||
|
||||
Note: "Blocking" and "Non-Blocking" have been added as
|
||||
permissible values for "data".
|
||||
"rc" is no longer set to the value of "data" (in the
|
||||
case of "F_GETFL").
|
||||
|
||||
|
||||
function: Socket('GetClientId', <domain>)
|
||||
result: rc clientid
|
||||
|
||||
Version1: rc = Socket('GetClientId', domain, clientid)
|
||||
|
||||
Note: "clientid" has been moved into the result string.
|
||||
|
||||
|
||||
function: Socket('GetDomainName')
|
||||
result: rc domain
|
||||
|
||||
No corresponding RXSOCKET Version 1 subfunction.
|
||||
The Version 1 GetHostName used to append the domain
|
||||
origin to the host name. The "GetDomainName" subfunction
|
||||
has been added to return the domain origin string.
|
||||
"GetHostName" has been changed to return just the host
|
||||
name.
|
||||
|
||||
|
||||
function: Socket('GetDTableSize') not implemented in RXSOCKET Version 2
|
||||
|
||||
Version1: rc = Socket('GetDTableSize')
|
||||
|
||||
The number of sockets for a specified socket set may be
|
||||
obtained using the "SocketSetStatus" subfunction. The
|
||||
number of sockets is also returned in the result string
|
||||
of the "Initialize" subfunction.
|
||||
|
||||
|
||||
function: Socket('GetHostByAddr', ipaddr)
|
||||
result: rc hostname
|
||||
|
||||
Version1: rc = Socket('GetHostByAddr', hostaddr, hostname)
|
||||
|
||||
Note: "hostname" has been moved into the result string.
|
||||
|
||||
|
||||
function: Socket('GetHostByName', hostname)
|
||||
result: rc ipaddr1 ipaddr2 ... ipaddrN
|
||||
|
||||
Version1: rc = Socket('GetHostByName', hostname)
|
||||
|
||||
Note: "rc" is no longer set to the "ipaddr" value. The
|
||||
result string may contain a list of "ipaddr" values.
|
||||
If the specified hostname is not multi-homed, then
|
||||
a single "ipaddr" value is returned (in the form:
|
||||
"nnn.nnn.nnn.nnn").
|
||||
|
||||
|
||||
function: Socket('GetHostId')
|
||||
result: rc ipaddr
|
||||
|
||||
Version1: rc = Socket('GetHostId')
|
||||
|
||||
Note: "rc" is no longer set to the "ipaddr" value.
|
||||
"ipaddr" is returned in the form "nnn.nnn.nnn.nnn".
|
||||
|
||||
|
||||
function: Socket('GetHostName')
|
||||
result: rc hostname
|
||||
|
||||
Version1: rc = Socket('GetHostName', hostname)
|
||||
|
||||
Note: "hostname" has been moved into the result string.
|
||||
"hostname" is returned as the "HostName" value from
|
||||
TCPIP DATA (or the value obtained from the TCPIP
|
||||
server) *WITHOUT* the Domain Origin string appended.
|
||||
|
||||
|
||||
function: Socket('GetPeerName', socket)
|
||||
result: rc name
|
||||
|
||||
Version1: rc = Socket('GetPeerName', socket, name)
|
||||
|
||||
Note: "name" has been moved into the result string.
|
||||
"name" is now returned as "AF_INET port nnn.nnn.nnn.nnn".
|
||||
|
||||
|
||||
function: Socket('GetProtoByName', protocol_name)
|
||||
result: rc protocol_number
|
||||
|
||||
No corresponding RXSOCKET Version 1 subfunction.
|
||||
|
||||
|
||||
function: Socket('GetProtoByNumber', protocol_number)
|
||||
result: rc protocol_name
|
||||
|
||||
No corresponding RXSOCKET Version 1 subfunction.
|
||||
|
||||
|
||||
function: Socket('GetServByName', service_name, <service_protocol>)
|
||||
result: rc service_name service_port service_protocol
|
||||
|
||||
No corresponding RXSOCKET Version 1 subfunction.
|
||||
*All* values listed in RFC1340 for "service_name" are
|
||||
supported. See "well known ports" in RFC1340.
|
||||
|
||||
function: Socket('GetServByPort', service_port, <service_protocol>)
|
||||
result: rc service_name service_port service_protocol
|
||||
|
||||
No corresponding RXSOCKET Version 1 subfunction.
|
||||
*All* values listed in RFC1340 for "service_port" are
|
||||
supported. See "well known ports" in RFC1340.
|
||||
|
||||
|
||||
function: Socket('GetSockName', socket)
|
||||
result: rc name
|
||||
|
||||
Version1: rc = Socket('GetSockName', socket, name)
|
||||
|
||||
Note: "name" has been moved into the result string.
|
||||
"name" is now returned as "AF_INET port nnn.nnn.nnn.nnn".
|
||||
|
||||
|
||||
function: Socket('GetSockOpt', socket, level, optname)
|
||||
result: rc optval
|
||||
|
||||
Version1: rc = Socket('GetSockOpt', socket, level, optname, optval)
|
||||
|
||||
Note: "optval" has been moved into the result string.
|
||||
Values for "optval" are now returned in a more
|
||||
human-usable format.
|
||||
|
||||
|
||||
function: Socket('GiveSocket', socket, clientid)
|
||||
result: rc
|
||||
|
||||
Version1: rc = Socket('GiveSocket', socket, clientid)
|
||||
|
||||
Note: This subfunction now works.
|
||||
"clientid" is now specified as "AF_INET subtaskid userid".
|
||||
|
||||
|
||||
function: Socket('Ioctl', socket, cmd, <data>)
|
||||
result: rc <data>
|
||||
|
||||
Version1: rc = Socket('Ioctl', socket, cmd, data)
|
||||
|
||||
Note: This subfunction now works.
|
||||
Values for "data" are now accepted and returned in a
|
||||
more human-usable format.
|
||||
|
||||
|
||||
function: Socket('Listen', socket, <backlog>)
|
||||
result: rc
|
||||
|
||||
Version1: rc = Socket('Listen', socket, backlog)
|
||||
|
||||
Note: "backlog" now defaults to "10".
|
||||
|
||||
|
||||
function: Socket('Path') removed from RXSOCKET Version 2
|
||||
|
||||
Version1: rc = Socket('Path', subtaskid)
|
||||
|
||||
Note: This function has been renamed to "SocketSet".
|
||||
|
||||
|
||||
function: Socket('Read', socket, <length>)
|
||||
result: rc length data
|
||||
|
||||
Version1: rc = Socket('Read', socket, data, length)
|
||||
|
||||
Note: "rc" is no longer set to the number of bytes read.
|
||||
"length" defaults to "10000", with a maximum value
|
||||
of "100000".
|
||||
"data" has been moved into the result string.
|
||||
|
||||
|
||||
function: Socket('Recv', socket, <length>, <flags>)
|
||||
result: rc length data
|
||||
|
||||
Version1: rc = Socket('Recv', socket, data, length, flags)
|
||||
|
||||
Note: "rc" is no longer set to the number of bytes read.
|
||||
"length" defaults to "10000", with a maximum value
|
||||
of "100000".
|
||||
"data" has been moved into the result string.
|
||||
"flags" may now contain more than a single value.
|
||||
|
||||
|
||||
function: Socket('RecvFrom', socket, <length>, <flags>)
|
||||
result: rc name length data
|
||||
|
||||
Version1: rc = Socket('RecvFrom', socket, data, length, flags, name)
|
||||
|
||||
Note: "rc" is no longer set to the number of bytes read.
|
||||
"length" defaults to "10000", with a maximum value
|
||||
of "100000".
|
||||
"data" has been moved into the result string.
|
||||
"name" has been moved into the result string.
|
||||
"flags" may now contain more than a single value.
|
||||
|
||||
|
||||
function: Socket('Resolve', ipaddr|hostname, <timeout>)
|
||||
result: rc ipaddr hostname
|
||||
|
||||
No corresponding RXSOCKET Version 1 subfunction.
|
||||
|
||||
Note: I use "Resolve" instead of "GetHostByAddr" and
|
||||
"GetHostByName" since "Resolve" does not care
|
||||
whether its input is an IP address or a hostname.
|
||||
"timeout" allows you to override the "ResolverTimeout"
|
||||
value in TCPIP DATA.
|
||||
|
||||
|
||||
function: Socket('Select', 'Read n Write n Exception n', <timeout>)
|
||||
result: rc numready READ n n WRITE n n n EXCEPTION n
|
||||
|
||||
Version1: rc = Socket('Select', nfds, rmask, wmask, xmask, timeout)
|
||||
|
||||
Note: All the bitmask manipulation functions (FD_SET, FD_CLR,
|
||||
etc.) have been removed.
|
||||
Specifying "0" as a value for "n" still refers to the
|
||||
console ("Read 0" means, "wait for a Console Attention").
|
||||
REXXWAIT is far superior in function to "Select"
|
||||
("Wait('Cons Time 5 Seconds Socket' socket 'SMSG')" is
|
||||
certainly lots more versatile.)
|
||||
"Select" is handy for applications that don't require
|
||||
enhanced "wait" facilities.
|
||||
|
||||
|
||||
function: Socket('Send', socket, data, <flags>)
|
||||
result: rc length
|
||||
|
||||
Version1: rc = Socket('Send', socket, data, flags)
|
||||
|
||||
Note: "rc" is no longer set to the number of bytes transmitted.
|
||||
|
||||
|
||||
function: Socket('SendTo', socket, data, <flags>, name)
|
||||
result: rc length
|
||||
|
||||
Version1: rc = Socket('SendTo', socket, data, flags, name)
|
||||
|
||||
Note: "rc" is no longer set to the number of bytes transmitted.
|
||||
"name" is now specified as "AF_INET port ipaddr|hostname".
|
||||
|
||||
|
||||
function: Socket('SetSockOpt', socket, level, optname, optval)
|
||||
result: rc
|
||||
|
||||
Version1: rc = Socket('SetSockOpt', socket, level, optname, optval)
|
||||
|
||||
Note: "optval" can now be expressed in a more human-usable
|
||||
format.
|
||||
An "optname" of "SO_ASCII" indicates that the data
|
||||
flowing across the socket should be "ASCII". Please
|
||||
note that RXSOCKET Version 1 used "SO_EBCDIC" for
|
||||
this purpose. "SO_EBCDIC" now indicates that the
|
||||
data flowing across the socket is EBCDIC and is to
|
||||
be treated as such. "So_ASCII" set to "On" forces
|
||||
data translation to and from EBCDIC (thus allowing
|
||||
ASCII data to flow across the socket).
|
||||
|
||||
|
||||
function: Socket('ShutDown', socket, <how>)
|
||||
result: rc
|
||||
|
||||
Version1: rc = Socket('ShutDown', socket, how)
|
||||
|
||||
Note: "how" now defaults to "BOTH" (instead of "FROM").
|
||||
|
||||
|
||||
function: Socket('Socket', <domain>, <type>, <protocol>)
|
||||
result: rc newsocket
|
||||
|
||||
Version1: rc = Socket('Socket', domain, type, protocol)
|
||||
|
||||
Note: "rc" is no longer set to the value of "newsocket".
|
||||
"domain" defaults to "AF_INET".
|
||||
"type" defaults to "Sock_Stream".
|
||||
"protocol" defaults to "IPPROTO_TCP".
|
||||
|
||||
|
||||
function: Socket('SocketSet', <subtaskid>)
|
||||
result: rc subtaskid
|
||||
|
||||
Version1: rc = Socket('Path', subtaskid)
|
||||
|
||||
Note: When switching to a new socket set, the name of the
|
||||
previously active socket set is returned. This makes
|
||||
it easier to switch back if switching between many
|
||||
socket sets. If switching between 2 socket sets,
|
||||
you needn't bother remembering the previously active
|
||||
socket set name, since RXSOCKET maintains socket sets
|
||||
on a push-down stack in Least Recently Used order.
|
||||
|
||||
|
||||
function: Socket('SocketSetList')
|
||||
result: rc subtaskid1 subtaskid2 ... subtaskidN
|
||||
|
||||
No corresponding RXSOCKET Version 1 subfunction.
|
||||
|
||||
|
||||
function: Socket('SocketSetStatus', <subtaskid>)
|
||||
result: rc subtaskid status <connectinfo>|<reason>
|
||||
|
||||
No corresponding RXSOCKET Version 1 subfunction.
|
||||
|
||||
|
||||
function: Socket('TakeSocket', clientid, hissocket)
|
||||
result: rc newsocket
|
||||
|
||||
Version1: rc = Socket('TakeSocket', clientid, hissocket)
|
||||
|
||||
Note: This subfunction now works.
|
||||
"rc" is no longer set to the value of "newsocket".
|
||||
"clientid" is now specified as "AF_INET subtaskid userid".
|
||||
|
||||
|
||||
function: Socket('Terminate', <subtaskid>)
|
||||
result: rc subtaskid
|
||||
|
||||
Version1: rc = Socket('Terminate', subtaskid)
|
||||
|
||||
Note: if "subtaskid" is omitted, the "active" socket set
|
||||
is terminated. In any case, the name of the terminated
|
||||
socket set is returned in the result string.
|
||||
|
||||
|
||||
function: Socket('Version')
|
||||
result: rc REXX/SOCKETS version date
|
||||
|
||||
rs = Socket('Version')
|
||||
|
||||
Note: "rs" is similar in format to the result string.
|
||||
The associated "version" values. of course, differ.
|
||||
|
||||
|
||||
function: Socket('Write', socket, data)
|
||||
result: rc length
|
||||
|
||||
Version1: rc = Socket('Write', socket, data)
|
||||
|
||||
Note: "rc" is no longer set to the number of bytes transmitted.
|
||||
|
||||
|
||||
A word from your sponsors:
|
||||
--------------------------
|
||||
|
||||
Rainer and I worked long and hard on this collaboration. We hope it
|
||||
was a successful one. We love feedback, comments and suggestions.
|
||||
I personally prefer chocolate.
|
||||
|
||||
Please let us know if you run into any problems with REXX/SOCKETS.
|
||||
|
||||
Cheers,
|
||||
Arty Ecock - CUNY/UCC
|
||||
Rainer Hauser - IBM, Zurich
|
||||
BIN
vm.modules/rxsocket.vmarc
Normal file
BIN
vm.modules/rxsocket.vmarc
Normal file
Binary file not shown.
Reference in New Issue
Block a user