home bbs files messages ]

Just a sample of the Echomail archive

<< oldest | < older | list | newer > | newest >> ]

 Message 457 
 mark lewis to Manuel Adorni 
 DOOR32.SYS 
 23 Oct 15 11:16:16 
 
23 Oct 15 10:21, you wrote to me:

 ml>> socket   type   foreign   local     foreign         state
 ml>>                  port      port       host

 MA> How i can read the COM Socket handle??? Or is imposible?

in the chart i posted, that was from netstat... the telnet com socket handle
would be identified by the local port of 23 if telnet is being run on the
standard telnet port... it is impossible to get the socket handle number
without assistance from the telnet connection software or from the virtual
modem...


the only way i see to do it is as was pointed out by another poster... that
solution is to use what is now known as gamesrv as your telnet server...
gamesrv fires up netfoss via the nf.bat... the socket handle number is passed
between gamesrv and netfoss via the % parameters in the .bat... the socket
number may be saved in the nf.bat file for use later...

eg: gamesrv -> nf.bat -> ra

inside nf.bat a line can be added to set the handle into an environment
variable...


eg: modified from the pcmicro page... http://pcmicro.com/NetFoss/telsrv.html

      @echo off
      REM NF.BAT for NetFoss
      REM the next line is to capture the socket handle
      set T-HANDLE=%1
      shift
      REM now we processing like normal
      c:\telsrv\netfoss.com %1
      if errorlevel 1 goto end
      c:\telsrv\netcom.exe %1 %2 %3 %4 %5 %6 %7 %8 %9
      c:\telsrv\netfoss.com /u
      :end


and the command line in telsrv/gamesrv would be

  c:\telsrv\nf.bat *H /n*N /h*H c:\ra\ra.exe -n*N -B57600


what we've done is to add the first "*H" to the nf.bat command line so that we
can capture just the socket number via %1... then in nf.bat we've added a line
to set the socket number into our %variable... finally we shift all the rest
of the parameters left one place and continue nf.bat as if nothing had
changed...

now when creating the door32.sys file, the value of %T-HANDLE is available to
be placed into line 2 as needed...


the tricky part is going to be creating the door32.sys but i have an idea on
that, too... it uses one of RA's template capabilities to make a stub file
with all the other lines needed from line 3 to the end of the drop file... in
the menu line for the door would be something like

  *c /c mydoor.bat *Sd32sys

which will use the RATemplate file D32SYS.RAT in the main RA directory to
create a file named "D32SYS" in the node's directory... D32SYS.RAT would look
like this...

===== snip =====
^KR
RemoteAccess 2.60

^Fa
^F3
^Fo
^F_
1
^KW
===== snip =====

^K is the actual ALT-011 character
^F is the actual ALT-006 character

the blank line is for the user's record number and we don't have any way to
get that via these ^K and ^F macros... the '1' in the next to last line
/forces/ ANSI mode because we can't determine which of ASCII, ANSI, Avatar or
RIP is used via the macros without some script processing of the values...
since RA doesn't do Max Graphics, we don't have to worry about that one...

then in your door's bat file we would do something like this...

===== snip =====
@echo off
REM mydoor.bat
REM start with a new door32.sys and show a telnet connection
echo 2 > door32.sys

REM set socket handle in door32.sys
echo %T-HANDLE >> door32.sys

REM get the rest of the settings from the d32sys file
type d32sys >> door32.sys

REM now run our door and cross our fingers
runmydoor.exe
:end
===== snip =====


NOTE: i've not actually tested any of this... it should work or at least be
very very close to what is needed  :)


)\/(ark

... We may be alone or not; either way, the thought is staggering.
---
 * Origin:  (1:3634/12.73)

<< oldest | < older | list | newer > | newest >> ]

(c) 1994,  bbs@darkrealms.ca