fxremoteio.bis

来自「用VB实现的编译器的源代码」· BIS 代码 · 共 104 行

BIS
104
字号
class TCPSocket

  <definitions>

  variable SocketHandle
    LongHandle
    [0]
  end variable

  method connect
    2
    Host
    Port
  end method

  method listen
    1
    Port
  end method

  method accept
    1
    ID
  end method

  method assignTalk
    1
    Classname
  end method

  method write
    1
    Text
  end method

  method writeLn
    1
    Text
  end method

  method setName
    1
    Name
  end method

  <methods>

  method void init
    createSocket SocketHandle
  end method

  method void connect
    connect [:this.SocketHandle] [#Host] [#Port]
  end method
 
  method void close
    close [:this.SocketHandle]
  end method

  method void listen
    serveOn [:this.SocketHandle] [#Port]
  end method

  method void accept
    clientAccept [#ID]
  end method

  method void assignTalk
    assignSocketTalk [:this.SocketHandle] [#Classname]
  end method

  method void suppressTalk
    suppressSocketTalk [:this.SocketHandle]
  end method

  method function read
    streamRead [:this.SocketHandle]
    return [+Misc]
  end method

  method void write
    streamWrite [:this.SocketHandle] [#Text]
  end method

  method void writeLn
    streamWrite [:this.SocketHandle] [#Text & "%0D"]
  end method

  method function getRequest
    clientRequest [:this.SocketHandle]
    return [+Misc]
  end method

  method void setName
    socketName [:this.SocketHandle] [#Name]
  end method

  method function getHandle
    return [:this.SocketHandle]
  end method

end class

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?