10 REM > ServReply
   20 REM Sample to to respond to FindServer requests
   30 :
   40 DIM ctrl% 15,txBuf% 255,rxBuf% 127,svBuf% 15:X%=ctrl%:Y%=X%DIV256
   50 MyName$="MUGINS  "              :REM My server type
   60 MyPort%=ASC"M"                  :REM Port for clients to use to talk to me
   70 ver$="1.00"                     :REM My version number
   80 svNum%=0:rxNum%=0
   90 PROCopenServ:PROCopenAction     :REM Listen to server port and command port
  100 REPEAT
  110     IFFNNet_Rx(svNum%):PROCserver:PROCopenServ   :REM FindServer request
  120     IFFNNet_Rx(rxNum%):PROCaction:PROCopenAction :REM Action request
  130 UNTIL FALSE
  140 :
  150 DEFPROCopenServ  :svNum%=FNNet_RxOpen(0,&B0,svBuf%,12):ENDPROC
  160 DEFPROCopenAction:rxNum%=FNNet_RxOpen(0,MyPort%,rxBuf%,256):ENDPROC
  170 :
  180 DEFPROCserver:rx%=FNNet_RxRead(svNum%):stn%=X%!3:svBuf%?8=13
  190 IFLEFT$($svBuf%,6)<>MyName$ AND $svBuf%<>"        ":ENDPROC
  200 ?txBuf%=0:txBuf%?1=MyPort%:txBuf%?2=EVAL("&"+STR$(10*VALver$))
  210 $(txBuf%+3)=MyName$:txBuf%?11=0
  220 tx%=FNNet_Tx(stn%,&80,&B1,txBuf%,12+txBuf%?11,0)
  230 ENDPROC
  240 :
  250 DEFPROCaction
  260 rx%=FNNet_RxRead(rxNum%)
  270 :
  280 REM Do something with contents of received data
  290 :
  300 ENDPROC