⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ipcservr.tex

📁 很牛的GUI源码wxWidgets-2.8.0.zip 可在多种平台下运行.
💻 TEX
字号:
\section{\class{wxServer}}\label{wxserver}A wxServer object represents the server part of a client-serverDDE-like (Dynamic Data Exchange) conversation. The actualDDE-based implementation using wxDDEServer is available on Windowsonly, but a platform-independent, socket-based version of thisAPI is available using wxTCPServer, which has the same API.To create a server which can communicate with a suitable client,you need to derive a class from wxConnection and another fromwxServer. The custom wxConnection class will interceptcommunications in a `conversation' with a client, and the customwxServer is required so that a user-overridden \helpref{wxServer::OnAcceptConnection}{wxserveronacceptconnection} member can return a wxConnection of the required class, when aconnection is made. Look at the IPC sample and the \helpref{Interprocess communications overview}{ipcoverview} foran example of how to do this.\wxheading{Derived from}wxServerBase\wxheading{Include files}<wx/ipc.h>\wxheading{See also}\helpref{wxClient}{wxclient},\helpref{wxConnection}{wxddeconnection}, \helpref{IPCoverview}{ipcoverview}\latexignore{\rtfignore{\wxheading{Members}}}\membersection{wxServer::wxServer}\label{wxserverctor}\func{}{wxServer}{\void}Constructs a server object.\membersection{wxServer::Create}\label{wxservercreate}\func{bool}{Create}{\param{const wxString\& }{service}}Registers the server using the given service name. Under Unix,the service name may be either an integer port identifier inwhich case an Internet domain socket will be used for thecommunications, or a valid file name (which shouldn't exist andwill be deleted afterwards) in which case a Unix domain socket iscreated. false is returned if the call failed (for example, theport number is already in use).\membersection{wxServer::OnAcceptConnection}\label{wxserveronacceptconnection}\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 wxConnection type, or (more likely) of auser-derived type.If the topic is {\bf STDIO}, the application may wish to refuse theconnection. Under UNIX, when a server is created theOnAcceptConnection message is always sent for standard input andoutput, but in the context of DDE messages it doesn't make a lotof sense.

⌨️ 快捷键说明

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