Prg_Ipc_Port_Create_Listen()

Abstract

Creates a PRG IPC port with a given IP port number and listens for connection requests.

Syntax

Prg_Ipc_Port_Create_Listen (port_number, handler, ph_ptr)
Argument Type Description
port_number int the IP port number on which the created port will be listening
handler PrgT_Ipc_Packet_Handler handler function that will be called when any data comes into the port created

Return Type

PrgT_Compcode

Return PrgC_Compcode_Success on success, PrgC_Compcode_Failure if failed

prg_ipc.h

Details

Creates a PRG IPC port on given IP port number (e.g. 4537) and starts listening for connection requests to this port, then returns the port's handle by setting ph_ptr. This function also registers the handler for incoming data and the port status notification on that port.

If port_number is PRGC_IPC_LISTEN_PORT_ANY, then the port created will start listening on an IP port number determined by the calling program (to avoid possible IP port conflicts with other running programs). The actual IP port number can be obtained by calling Prg_Ipc_Port_Listen_Port_Number_Get() on the port handle returned.

The prototype for handler is given in PrgT_Ipc_Packet_Handler.

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · Documentation compiled and provided by Beijing ZNetLink Technology Co., Ltd.

交流群 · QQ Group:OPNET/智网妙算网络仿真交流群(群号 486383494)

原文档 © 2017 Riverbed Technology · 本站为公益翻译,由 AI 辅助完成,请仔细甄别

Original documentation © 2017 Riverbed Technology. Community translation, AI-assisted. Contact: jiazequn@znetlink.com