tcpservr.tex
来自「很牛的GUI源码wxWidgets-2.8.0.zip 可在多种平台下运行.」· TEX 代码 · 共 50 行
TEX
50 行
\section{\class{wxTCPServer}}\label{wxtcpserver}A wxTCPServer object represents the server part of a client-server conversation.It emulates a DDE-style protocol, but uses TCP/IP which is available on most platforms.A DDE-based implementation for Windows is available using \helpref{wxDDEServer}{wxddeserver}.\wxheading{Derived from}wxServerBase\\\helpref{wxObject}{wxobject}\wxheading{Include files}<wx/sckipc.h>\wxheading{See also}\helpref{wxTCPClient}{wxtcpclient}, \helpref{wxTCPConnection}{wxtcpconnection}, \helpref{IPC overview}{ipcoverview}\latexignore{\rtfignore{\wxheading{Members}}}\membersection{wxTCPServer::wxTCPServer}\label{wxtcpserverctor}\func{}{wxTCPServer}{\void}Constructs a server object.\membersection{wxTCPServer::Create}\label{wxtcpservercreate}\func{bool}{Create}{\param{const wxString\& }{service}}Registers the server using the given service name. Under Unix, thestring must contain an integer id which is used as an Internet portnumber. false is returned if the call failed (for example, the portnumber is already in use).\membersection{wxTCPServer::OnAcceptConnection}\label{wxtcpserveronacceptconnection}\func{virtual wxConnectionBase *}{OnAcceptConnection}{\param{const wxString\& }{topic}}When a client calls {\bf MakeConnection}, the server receives themessage and this member is called. The application should derive amember to intercept this message and return a connection object ofeither the standard wxTCPConnection type, or of a user-derived type. If thetopic is ``STDIO'', the application may wish to refuse the connection.Under Unix, when a server is created the OnAcceptConnection message isalways sent for standard input and output.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?