| /////////////////////////////////////////////////////////////////////////////// |
| // |
| // Copyright (c) 2000-2018 Ericsson Telecom AB |
| // |
| // All rights reserved. This program and the accompanying materials |
| // are made available under the terms of the Eclipse Public License v2.0 |
| // which accompanies this distribution, and is available at |
| // https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html |
| /////////////////////////////////////////////////////////////////////////////// |
| // |
| // File: EPTF_HTTP_Transport_Definitions.ttcn |
| // Rev: <RnXnn> |
| // Prodnr: CNL 113 618 |
| // Updated: 2014-03-21 |
| // Contact: http://ttcn.ericsson.se |
| /////////////////////////////////////////////////////////////////////////////// |
| |
| /////////////////////////////////////////////////////////// |
| // Module: EPTF_HTTP_Transport_Definitions |
| // |
| // Purpose: |
| // This module contains the definitions to the HTTP Transport |
| // |
| // Module Parameters: |
| // tsp_EPTF_HTTP_Transport_loggingComponentMask - *charstring* - logging component mask id |
| // tsp_EPTF_HTTP_Transport_loggingEnable - *boolean* - enable/disable the transport logging |
| // |
| // Module depends on: |
| // <EPTF_HTTP_Definitions> |
| // |
| // <EPTF_CLL_Common_Definitions> |
| // |
| // <EPTF_CLL_Base_Definitions> |
| // |
| // <EPTF_CLL_LGenBase_Definitions> |
| // |
| // <EPTF_HTTP_Logger_Definitions> |
| // |
| // <EPTF_CLL_FBQ_Definitions> |
| // |
| // <EPTF_CLL_TransportDefinitions> |
| // |
| // <EPTF_CLL_TransportMessageBufferManager_Definitions> |
| // |
| // <EPTF_CLL_Logging_Definitions> |
| // |
| // <EPTF_CLL_TransportCommPortIPL4_Definitions> |
| // |
| // <IPL4asp_Types> |
| // |
| // <TCCMaths_GenericTypes> |
| // |
| // Current Owner: |
| // EAKOPER |
| // |
| // Last Review Date: |
| // 2009-08-10 |
| // |
| // Detailed Comments: |
| // - |
| // |
| /////////////////////////////////////////////////////////// |
| |
| module EPTF_HTTP_Transport_Definitions { |
| |
| //============================================================================= |
| // Imports |
| //============================================================================= |
| import from EPTF_CLL_Common_Definitions all; |
| import from EPTF_CLL_Base_Definitions all; |
| //import from EPTF_CLL_LGenBase_Definitions all; |
| import from EPTF_CLL_FBQ_Definitions all; |
| import from EPTF_CLL_TransportRouting_Definitions all; |
| import from EPTF_CLL_TransportMessageBufferManager_Definitions all; |
| import from EPTF_CLL_Logging_Definitions all; |
| import from EPTF_CLL_TransportCommPortIPL4_Definitions all; |
| import from EPTF_CLL_HashMap_Definitions all; |
| |
| import from EPTF_HTTP_Definitions all; |
| |
| import from IPL4asp_Types all; |
| |
| import from TCCMaths_GenericTypes all; |
| |
| //============================================================================= |
| // Module parameters |
| //============================================================================= |
| |
| modulepar charstring tsp_EPTF_HTTP_Transport_loggingComponentMask := "EPTF_HTTP_Transport"; |
| modulepar boolean tsp_EPTF_HTTP_Transport_loggingEnable := false; |
| modulepar boolean tsp_EPTF_HTTP_Transport_bufferLogEnable := false; |
| modulepar boolean tsp_EPTF_HTTP_Transport_messageBufferEnable := false; |
| modulepar integer tsp_EPTF_HTTP_bufferSize := 100; |
| |
| //============================================================================= |
| // Data types |
| //============================================================================= |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Group: EPTF_HTTP_Transport |
| // |
| // Purpose: |
| // The definitions of the EPTF HTTP Transport |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| group EPTF_HTTP_Transport { |
| /////////////////////////////////////////////////////////////////////////////// |
| // Type: EPTF_HTTP_Transport_ConnectionState |
| // |
| // Purpose: |
| // HTTP states |
| // |
| // Elements: |
| // IDLE(0), |
| // OPENED(1) |
| // HALFCLOSED(2) |
| // CLOSED(3) |
| // |
| // Detailed Comments: |
| // - |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| type enumerated EPTF_HTTP_Transport_ConnectionState { |
| IDLE, |
| OPENED, |
| HALFCLOSED, |
| CLOSED |
| } |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Type: EPTF_HTTP_Transport_PortType |
| // |
| // Purpose: |
| // Port type |
| // |
| // Elements: |
| // LISTENING(0) - |
| // INCOMING_PORT(1) - |
| // OUTGOING_PORT(2) - |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| type enumerated EPTF_HTTP_Transport_PortType{ |
| LISTENING_PORT, |
| INCOMING_PORT, |
| OUTGOING_PORT |
| } |
| /////////////////////////////////////////////////////////////////////////////// |
| // Type: EPTF_HTTP_Transport_GroupOperation_FT |
| // |
| // Purpose: |
| // Function type to a registerable callback functions to |
| // add/remove ports to/from a port group |
| // |
| // Elements: |
| // pl_group - *in* *integer* - port group index |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| type function EPTF_HTTP_Transport_GroupOperation_FT( |
| in integer pl_group) |
| runs on EPTF_HTTP_LocalTransport_CT return boolean; |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Type: EPTF_HTTP_Transport_SelectPort_FT |
| // |
| // Purpose: |
| // Function type to a registerable callback functions to |
| // select a port for sending within a port group |
| // |
| // Elements: |
| // pl_group - *in* *integer* - port group index |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| type function EPTF_HTTP_Transport_SelectPort_FT( |
| in integer pl_group) |
| runs on EPTF_HTTP_LocalTransport_CT return integer; |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Type: EPTF_HTTP_Transport_SessionOperation_FT |
| // |
| // Purpose: |
| // Function type to a registerable callback functions to |
| // provide a session operation on a group |
| // |
| // Elements: |
| // pl_group - *in* *integer* - port group index |
| // pl_sessionId - *in* *integer* - session id |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| type function EPTF_HTTP_Transport_SessionOperation_FT( |
| in integer pl_group, |
| in integer pl_sessionId) |
| runs on EPTF_HTTP_LocalTransport_CT; |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Type: EPTF_HTTP_Transport_PortOperation_FT |
| // |
| // Purpose: |
| // Function type to a registerable callback functions to |
| // provide a session operation on a group |
| // |
| // Elements: |
| // pl_group - *in* *integer* - port group index |
| // pl_portId - *in* *integer* - port id |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| type function EPTF_HTTP_Transport_PortOperation_FT( |
| in integer pl_group, |
| in integer pl_portId) |
| runs on EPTF_HTTP_LocalTransport_CT; |
| |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Type: EPTF_HTTP_Transport_GetGroupAndPort_FT |
| // |
| // Purpose: |
| // Function type to a registerable callback functions to |
| // acquire port group and port index for a connection id |
| // |
| // Elements: |
| // pl_connId - *in* *integer* -connection id |
| // pl_group - *inout* *integer* - port group index |
| // pl_port - *inout* *integer* - port index |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| type function EPTF_HTTP_Transport_GetGroupAndPort_FT( |
| in integer pl_connId, |
| inout integer pl_group, |
| inout integer pl_port) |
| runs on EPTF_HTTP_LocalTransport_CT return boolean; |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Type: EPTF_HTTP_Transport_GetGroup_FT |
| // |
| // Purpose: |
| // Function type to a registerable callback functions to |
| // acquire port group ndex for a connection id |
| // |
| // Elements: |
| // pl_connId - *in* *integer* -connection id |
| // pl_groupId - *inout* *integer* - port group index |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| type function EPTF_HTTP_Transport_GetGroup_FT( |
| in integer pl_connId, |
| inout integer pl_groupId) |
| runs on EPTF_HTTP_LocalTransport_CT return boolean; |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Type: EPTF_HTTP_Transport_SendFunction_FT |
| // |
| // Purpose: |
| // Function type to a registerable callback functions to |
| // send an encoded message over a port group |
| // |
| // Elements: |
| // pl_group - *in* *integer* - port group index |
| // pl_sessionId - *in* *integer* - session id for sending |
| // pl_msg - *in* *octetstring* - message to send |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| type function EPTF_HTTP_Transport_SendFunction_FT( |
| in integer pl_group, |
| in integer pl_sessionId, |
| in octetstring pl_msg) |
| runs on EPTF_HTTP_LocalTransport_CT; |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Type: EPTF_HTTP_Transport_SendResponse_FT |
| // |
| // Purpose: |
| // Function type to a registerable callback functions to |
| // send an encoded response over a port group |
| // |
| // Elements: |
| // pl_group - *in* *integer* - port group index |
| // pl_portId - *in* *integer* - port id for sending |
| // pl_seqNum - *in* *integer* - sequence number of the response |
| // pl_msg - *in* *octetstring* - response to send |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| type function EPTF_HTTP_Transport_SendResponse_FT( |
| in integer pl_group, |
| in integer pl_portId, |
| in integer pl_seqNum, |
| in octetstring pl_msg |
| ) |
| runs on EPTF_HTTP_LocalTransport_CT; |
| /////////////////////////////////////////////////////////////////////////////// |
| // Type: EPTF_HTTP_Transport_OpenConnection_FT |
| // |
| // Purpose: |
| // Function type to a registerable callback functions to |
| // open port / port group connection |
| // |
| // Elements: |
| // pl_group - *in* *integer* - port group index |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| type function EPTF_HTTP_Transport_OpenConnection_FT( |
| in integer pl_group) |
| runs on EPTF_HTTP_LocalTransport_CT return boolean; |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Type: EPTF_HTTP_Transport_CloseConnection_FT |
| // |
| // Purpose: |
| // Function type to a registerable callback functions to |
| // cloase port / port group connection |
| // |
| // Elements: |
| // pl_group - *in* *integer* - port group index |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| type function EPTF_HTTP_Transport_CloseConnection_FT( |
| in integer pl_group) |
| runs on EPTF_HTTP_LocalTransport_CT; |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Type: EPTF_HTTP_Transport_ReceiveMessage_FT |
| // |
| // Purpose: |
| // Function type to a registerable callback functions to |
| // handle a received message |
| // |
| // Elements: |
| // pl_group - *in* *integer* - port group index |
| // pl_port - *in* *integer* - port index |
| // pl_msg - *in* *octetstring* - message to send |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| type function EPTF_HTTP_Transport_ReceiveMessage_FT( |
| in integer pl_group, |
| in integer pl_port, |
| in octetstring pl_msg) |
| runs on EPTF_HTTP_LocalTransport_CT; |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Type: EPTF_HTTP_Transport_ReceiveEvent_FT |
| // |
| // Purpose: |
| // Function type to a registerable callback functions to |
| // handle a received message |
| // |
| // Elements: |
| // pl_group - *in* *integer* - port group index |
| // pl_port - *in* *integer* - port index |
| // pl_type - *in* *integer* - event type |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| type function EPTF_HTTP_Transport_ReceiveEvent_FT ( |
| in integer pl_group, |
| in integer pl_port, |
| in integer pl_type) |
| runs on EPTF_HTTP_LocalTransport_CT; |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Type: EPTF_HTTP_Transport_Listen_FT |
| // |
| // Purpose: |
| // Function type to a registerable callback function for |
| // opening a listen port |
| // |
| // Elements: |
| // pl_group - *in* *integer* - port group index |
| // |
| // Return value: |
| // boolean - open result |
| /////////////////////////////////////////////////////////////////////////////// |
| type function EPTF_HTTP_Transport_Listen_FT( |
| in integer pl_group) |
| runs on EPTF_HTTP_LocalTransport_CT return integer; |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Type: EPTF_HTTP_Transport_CreateIncomingConn_FT |
| // |
| // Purpose: |
| // Function type to a registerable callback functions to |
| // store an incoming connection |
| // |
| // Elements: |
| // pl_group - *in* *integer* - port group index |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| type function EPTF_HTTP_Transport_CreateIncomingConn_FT( |
| in integer pl_group, |
| in ConnectionOpenedEvent pl_connOpened, |
| inout integer pl_port) |
| runs on EPTF_HTTP_LocalTransport_CT return boolean; |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Type: EPTF_HTTP_Transport_RemoveIncomingConn_FT |
| // |
| // Purpose: |
| // Function type to a registerable callback functions to |
| // remove an incoming connection |
| // |
| // Elements: |
| // pl_group - *in* *integer* - port group index |
| // pl_port - *in* *integer* - port index in the group |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| type function EPTF_HTTP_Transport_RemoveIncomingConn_FT( |
| in integer pl_group, |
| in integer pl_port) |
| runs on EPTF_HTTP_LocalTransport_CT; |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Type: EPTF_HTTP_Transport_UserFunctions |
| // |
| // Purpose: |
| // Record to store function referencies for a port group |
| // |
| // Elements: |
| // addPort - <EPTF_HTTP_Transport_GroupOperation_FT> *optional* - add port function ref |
| // removePort - <EPTF_HTTP_Transport_GroupOperation_FT> *optional* - remove port function ref |
| // selectPort - <EPTF_HTTP_Transport_SelectPort_FT> *optional* - select port function ref |
| // sendMessage - <EPTF_HTTP_Transport_SendFunction_FT> *optional* - send message function ref |
| // closePortOfUser - <EPTF_HTTP_Transport_SessionOperation_FT> - close port of user function ref |
| // freePortOfUser - <EPTF_HTTP_Transport_SessionOperation_FT> - free port of user function ref |
| // openPort - <EPTF_HTTP_Transport_OpenConnection_FT> *optional* - open port function ref |
| // closeConnection - <EPTF_HTTP_Transport_CloseConnection_FT> *optional* - close port function ref |
| // halfClosePort - <EPTF_HTTP_Transport_CloseConnection_FT> *optional* - half close port function ref |
| // receiveMessage - <EPTF_HTTP_Transport_ReceiveMessage_FT> *optional* - receive message function ref |
| // receiveEvent - <EPTF_HTTP_Transport_ReceiveEvent_FT> *optional* - receive event function ref |
| // |
| // Detailed Comments: |
| // - |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| type record EPTF_HTTP_Transport_UserFunctions |
| { |
| EPTF_HTTP_Transport_GroupOperation_FT addPort optional, |
| EPTF_HTTP_Transport_GroupOperation_FT removePort optional, |
| EPTF_HTTP_Transport_SelectPort_FT selectPort optional, |
| EPTF_HTTP_Transport_SendFunction_FT sendMessage optional, |
| EPTF_HTTP_Transport_SessionOperation_FT closePortOfUser optional, |
| EPTF_HTTP_Transport_SessionOperation_FT freePortOfUser optional, |
| EPTF_HTTP_Transport_OpenConnection_FT openPort optional, |
| EPTF_HTTP_Transport_CloseConnection_FT closeConnection optional, |
| EPTF_HTTP_Transport_CloseConnection_FT halfClosePort optional, |
| EPTF_HTTP_Transport_ReceiveMessage_FT receiveMessage optional, |
| EPTF_HTTP_Transport_ReceiveEvent_FT receiveEvent optional |
| } |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // const: c_EPTF_HTTP_initUserFunctions |
| // |
| // Purpose: |
| // - |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| const EPTF_HTTP_Transport_UserFunctions c_EPTF_HTTP_initUserFunctions :={ |
| omit, |
| omit, |
| omit, |
| omit, |
| omit, |
| omit, |
| omit, |
| omit, |
| omit, |
| omit, |
| omit |
| } |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Type: EPTF_HTTP_Transport_ServerUserFunctions |
| // |
| // Purpose: |
| // Record to store function referencies for a server port group |
| // |
| // Elements: |
| // removePort - <EPTF_HTTP_Transport_GroupOperation_FT> *optional* - remove port function ref |
| // listen - <EPTF_HTTP_Transport_Listen_FT> *optional* - open a listen port function ref |
| // createIncomingConn - <EPTF_HTTP_Transport_CreateIncomingConn_FT> *optional* - create incoming connection function ref |
| // removeIncomingConn - <EPTF_HTTP_Transport_RemoveIncomingConn_FT> *optional* - remove incoming connection function ref |
| // sendResponse - <EPTF_HTTP_Transport_SendResponse_FT> *optional* - send response function ref |
| // receiveMessage - <EPTF_HTTP_Transport_ReceiveMessage_FT> *optional* - receive message function ref |
| // receiveEvent - <EPTF_HTTP_Transport_ReceiveEvent_FT> *optional* - receive event function ref |
| // closePort - <EPTF_HTTP_Transport_PortOperation_FT> - close connection function ref |
| // |
| // Detailed Comments: |
| // - |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| type record EPTF_HTTP_Transport_ServerUserFunctions |
| { |
| EPTF_HTTP_Transport_GroupOperation_FT removePort optional, |
| EPTF_HTTP_Transport_Listen_FT listen optional, |
| EPTF_HTTP_Transport_CreateIncomingConn_FT createIncomingConn optional, |
| EPTF_HTTP_Transport_RemoveIncomingConn_FT removeIncomingConn optional, |
| EPTF_HTTP_Transport_SendResponse_FT sendResponse optional, |
| EPTF_HTTP_Transport_ReceiveMessage_FT receiveMessage optional, |
| EPTF_HTTP_Transport_ReceiveEvent_FT receiveEvent optional, |
| EPTF_HTTP_Transport_PortOperation_FT closePort optional |
| } |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // const: c_EPTF_HTTP_initUserFunctions |
| // |
| // Purpose: |
| // - |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| const EPTF_HTTP_Transport_ServerUserFunctions c_EPTF_HTTP_initServerUserFunctions :={ |
| removePort := omit, |
| listen := omit, |
| createIncomingConn := omit, |
| removeIncomingConn := omit, |
| sendResponse := omit, |
| receiveMessage := omit, |
| receiveEvent := omit, |
| closePort := omit |
| } |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Type: EPTF_HTTP_Transport_GroupMode |
| // |
| // Purpose: |
| // Record to store information on a port group |
| // |
| // Elements: |
| // name - *charstring* *optional* - unique name of the group |
| // localHostInformation - <EPTF_HTTP_HostInformation> - local IP address |
| // and port |
| // remoteHostInformation - <EPTF_HTTP_HostInformation> - remote IP address |
| // and port |
| // numberOfPorts - *integer* - number of ports within the group to be |
| // created |
| // localportStep - *integer* - step of local port number after creation |
| // of each port |
| // remoteportStep - *integer* - step of remote port number after creation |
| // of each port |
| // instantConnOpen - *boolean* - instant connection open mode |
| // instantConnClose - *boolean* - instant connection close mode |
| // useSSL - *boolean* - use ssl mode |
| // userFunctions - <EPTF_HTTP_Transport_UserFunctions> *optional* - |
| // function references of group callback functions if needed |
| // |
| // Detailed Comments: |
| // Used for port group creation |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| type record EPTF_HTTP_Transport_GroupMode { |
| charstring name optional, |
| |
| EPTF_HTTP_HostInformation localHostInformation, |
| EPTF_HTTP_HostInformation remoteHostInformation, |
| integer numberOfPorts, |
| integer localportStep, |
| integer remoteportStep, |
| |
| boolean instantConnOpen, |
| boolean instantConnClose, |
| boolean useSSL, |
| |
| EPTF_HTTP_Transport_UserFunctions userFunctions optional |
| } |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Type: EPTF_HTTP_Transport_PortMode |
| // |
| // Purpose: |
| // Record to store information on a port group |
| // |
| // Elements: |
| // name - *charstring* *optional* - unique name of the port |
| // localHostInformation - <EPTF_HTTP_HostInformation> - local IP address |
| // and port |
| // remoteHostInformation - <EPTF_HTTP_HostInformation> - remote IP address |
| // and port |
| // instantConnOpen - *boolean* - instant connection open mode |
| // instantConnClose - *boolean* - instant connection close mode |
| // useSSL - *boolean* - use ssl mode |
| // userFunctions - <EPTF_HTTP_Transport_UserFunctions> *optional* - |
| // function references of group callback functions if needed |
| // |
| // Detailed Comments: |
| // Used for port creation |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| type record EPTF_HTTP_Transport_PortMode { |
| charstring name optional, |
| |
| EPTF_HTTP_HostInformation localHostInformation, |
| EPTF_HTTP_HostInformation remoteHostInformation, |
| |
| boolean instantConnOpen, |
| boolean instantConnClose, |
| boolean useSSL, |
| |
| EPTF_HTTP_Transport_UserFunctions userFunctions optional |
| } |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Type: EPTF_HTTP_Transport_ServerPortMode |
| // |
| // Purpose: |
| // Contains information to create a new listening port group. |
| // |
| // Elements: |
| // name - *charstring* - unique name of the port |
| // localHostInformation - <EPTF_HTTP_HostInformation> - local IP address |
| // and port |
| // instantConnClose - *boolean* - instant connection close mode |
| // userFunctions - <EPTF_HTTP_Transport_ListeningUserFunctions> *optional* - |
| // function references of group callback functions if needed |
| // buffer - *boolean* - buffering mode |
| // useSSL - *boolean* - use SSL socket |
| // |
| // Detailed Comments: |
| // Used for port creation |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| type record EPTF_HTTP_Transport_ServerPortMode{ |
| charstring name, |
| |
| EPTF_HTTP_HostInformation localHostInformation, |
| boolean instantConnClose, |
| |
| EPTF_HTTP_Transport_ServerUserFunctions userFunctions optional, |
| boolean buffer, |
| boolean useSSL optional |
| } |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // const: c_EPTF_HTTP_initServerPortMode |
| // |
| // Purpose: |
| // - |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| const EPTF_HTTP_Transport_ServerPortMode c_EPTF_HTTP_initServerPortMode :={ |
| name := "", |
| localHostInformation := {"", -1}, |
| instantConnClose := false, |
| userFunctions := omit, |
| buffer := false, |
| useSSL := omit |
| } |
| /////////////////////////////////////////////////////////////////////////////// |
| // Type: EPTF_HTTP_Transport_Function |
| // |
| // Purpose: |
| // Record to store an element of the function group database |
| // |
| // Elements: |
| // addPort - <EPTF_HTTP_Transport_GroupOperation_FT> - add port function ref |
| // removePort - <EPTF_HTTP_Transport_GroupOperation_FT> - remove port function ref |
| // selectPort - <EPTF_HTTP_Transport_SelectPort_FT> - select port function ref |
| // sendMessage - <EPTF_HTTP_Transport_SendFunction_FT> - send message function ref |
| // closePortOfUser - <EPTF_HTTP_Transport_SessionOperation_FT> - close port of user function ref |
| // freePortOfUser - <EPTF_HTTP_Transport_SessionOperation_FT> - free port of user function ref |
| // openPort - <EPTF_HTTP_Transport_OpenConnection_FT> - open port function ref |
| // closeConnection - <EPTF_HTTP_Transport_CloseConnection_FT> - close port function ref |
| // halfClosePort - <EPTF_HTTP_Transport_CloseConnection_FT> - half close port function ref |
| // receiveMessage - <EPTF_HTTP_Transport_ReceiveMessage_FT> - receive message function ref |
| // receiveEvent - <EPTF_HTTP_Transport_ReceiveEvent_FT> - receive event function ref |
| // listen - <EPTF_HTTP_Transport_Listen_FT> - open a listen port function ref |
| // createIncomingConn - <EPTF_HTTP_Transport_CreateIncomingConn_FT> - create incoming connection function ref |
| // removeIncomingConn - <EPTF_HTTP_Transport_RemoveIncomingConn_FT> *optional* - remove incoming connection function ref |
| // closePort - <EPTF_HTTP_Transport_PortOperation_FT> - close connection function ref |
| // |
| // Detailed Comments: |
| // A port group has a number of registerable and stateless callback |
| // functions to handle communication. These kind of function sets can |
| // be registered into the function database. This element contains |
| // one functions set. |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| type record EPTF_HTTP_Transport_Function |
| { |
| EPTF_HTTP_Transport_GroupOperation_FT addPort, |
| EPTF_HTTP_Transport_GroupOperation_FT removePort, |
| EPTF_HTTP_Transport_SelectPort_FT selectPort, |
| EPTF_HTTP_Transport_SendFunction_FT sendMessage, |
| EPTF_HTTP_Transport_SendResponse_FT sendResponse, |
| EPTF_HTTP_Transport_SessionOperation_FT closePortOfUser, |
| EPTF_HTTP_Transport_SessionOperation_FT freePortOfUser, |
| EPTF_HTTP_Transport_OpenConnection_FT openPort, |
| EPTF_HTTP_Transport_CloseConnection_FT closeConnection, |
| EPTF_HTTP_Transport_CloseConnection_FT halfClosePort, |
| EPTF_HTTP_Transport_ReceiveMessage_FT receiveMessage, |
| EPTF_HTTP_Transport_ReceiveEvent_FT receiveEvent, |
| EPTF_HTTP_Transport_Listen_FT listen, |
| EPTF_HTTP_Transport_CreateIncomingConn_FT createIncomingConn, |
| EPTF_HTTP_Transport_RemoveIncomingConn_FT removeIncomingConn, |
| EPTF_HTTP_Transport_PortOperation_FT closePort |
| } |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // const: c_HTTP_Transport_initFunction |
| // |
| // Purpose: |
| // - |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| const EPTF_HTTP_Transport_Function c_HTTP_Transport_initFunction:= |
| { |
| addPort := null, |
| removePort := null, |
| selectPort := null, |
| sendMessage := null, |
| sendResponse := null, |
| closePortOfUser := null, |
| freePortOfUser := null, |
| openPort := null, |
| closeConnection := null, |
| halfClosePort := null, |
| receiveMessage := null, |
| receiveEvent := null, |
| listen := null, |
| createIncomingConn := null, |
| removeIncomingConn := null, |
| closePort := null |
| } |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Type: EPTF_HTTP_Transport_FunctionList |
| // |
| // Purpose: |
| // Function database for port groups |
| // |
| // Elements: |
| // record of <EPTF_HTTP_Transport_Function> |
| // |
| // Detailed Comments: |
| // - |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| type record of EPTF_HTTP_Transport_Function EPTF_HTTP_Transport_FunctionList; |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Type: EPTF_HTTP_Transport_PortInfo |
| // |
| // Purpose: |
| // A port connection database element |
| // |
| // Elements: |
| // groupIndex - *integer* - index of the port group in which the |
| // port is situated |
| // portIndex - *integer* - self index of the port within the port |
| // connection database |
| // connectionId - *integer* - connection id of the current port |
| // localhostInfoIdx - *integer* - localhost information database index to |
| // acquire local IP adress and port number |
| // remotehostInfoIdx - *integer* - remotehost information database index to |
| // acquire remote IP adress and port number |
| // state - <EPTF_HTTP_Transport_ConnectionState> - state of current port |
| // portType - <EPTF_HTTP_Transport_PortType> - port type |
| // buffer - *boolean* - buffering mode |
| // mesageBuffer - <EPTF_HTTP_Buffer> - buffer for sequencing outgoing responses |
| // |
| // Detailed Comments: |
| // A port group has a number of registerable and stateless callback |
| // functions to handle communication. These kind of function sets can |
| // be registered into the function database. This element contains |
| // one functions set. |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| type record EPTF_HTTP_Transport_PortInfo { |
| integer groupIndex, |
| integer portIndex, |
| integer connectionId, |
| integer sessionId, |
| integer portId, |
| integer localhostInfoIdx, |
| integer remotehostInfoIdx, |
| EPTF_HTTP_Transport_ConnectionState state, |
| EPTF_HTTP_Transport_PortType portType, |
| boolean buffer, |
| EPTF_HTTP_MessageBuffer messageBuffer optional |
| } |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // const: c_EPTF_HTTP_LocalTransport_initPortInfo |
| // |
| // Purpose: |
| // - |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| const EPTF_HTTP_Transport_PortInfo c_EPTF_HTTP_LocalTransport_initPortInfo :={ |
| groupIndex := -1, |
| portIndex := -1, |
| connectionId := -1, |
| sessionId := -1, |
| portId := -1, |
| localhostInfoIdx := -1, |
| remotehostInfoIdx := -1, |
| state := IDLE, |
| portType := OUTGOING_PORT, |
| buffer := false, |
| messageBuffer := omit |
| } |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Type: EPTF_HTTP_MessageBuffer |
| // |
| // Purpose: |
| // Message buffer for response sequencing. |
| // |
| // Elements: |
| // seqNums - <EPTF_HTTP_SeqNumMgmt> - sequence number management |
| // seqNum2messageIdxHM - *integer* - hashmap reference to map a sequence number to a message queue index |
| // messageQueue - <EPTF_FreeBusyQueue> - index management for the message queue |
| // httpMessages - <EPTF_OctetstringList> - http messages in the buffer |
| // |
| // Detailed Comments: |
| // In case of a pipelining on a persistent connection the server MUST send its |
| // responses to the requests in the same order that the requests were received. |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| type record EPTF_HTTP_MessageBuffer |
| { |
| EPTF_HTTP_RingBuffer seqNums, |
| integer seqNum2messageIdxHM, |
| EPTF_FreeBusyQueue messageQueue, |
| OctetStringList httpMessages |
| } |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Type: EPTF_HTTP_RingBuffer |
| // |
| // Purpose: |
| // Handles sequence numbers of the responses |
| // |
| // Elements: |
| // isSlotBusyHM - *integer* - to decide if a given slot is busy |
| // nextSeqNum - *integer* - the sequence number of the next incoming request |
| // waitForSeqNum - *integer* - the sequence number of the next response to send out |
| // usedSlots - *integer* - number of used slowts in the buffer |
| // maxSize - *integer* - maximum size of the buffer |
| // |
| // Detailed Comments: |
| // In case of a pipelining on a persistent connection the server MUST send its |
| // responses to the requests in the same order that the requests were received. |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| type record EPTF_HTTP_RingBuffer{ |
| integer isSlotBusyHM, |
| integer nextSeqNum, |
| integer waitForSeqNum, |
| integer usedSlots, |
| integer maxSize |
| } |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Type: EPTF_HTTP_Transport_PortInfoList |
| // |
| // Purpose: |
| // Port connection database of a port group |
| // |
| // Elements: |
| // record of <EPTF_HTTP_Transport_PortInfo> |
| // |
| // Detailed Comments: |
| // - |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| type record of EPTF_HTTP_Transport_PortInfo EPTF_HTTP_Transport_PortInfoList; |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Type: EPTF_HTTP_Transport_PortGroup |
| // |
| // Purpose: |
| // An element of the port group database of the HTTP transport component |
| // |
| // Elements: |
| // name - *charstring* - unique name of the port group |
| // localHostInformation - <EPTF_HTTP_HostInformation> - base local IP |
| // address and port |
| // remoteHostInformation - <EPTF_HTTP_HostInformation> - base remote IP |
| // address and port |
| // currentPortId - *integer* - used to generate unique portId |
| // numberOfPorts - *integer* - number of ports within the group to be |
| // created |
| // localportStep - *integer* - step of local port number after creation |
| // of each port |
| // remoteportStep - *integer* - step of remote port number after creation |
| // of each port |
| // portDatabase - <EPTF_HTTP_Transport_PortInfoList> - port connection |
| // database of the group |
| // listeningPort - <EPTF_HTTP_Transport_PortInfo> *optional* - listening port info |
| // defaultFIdx - *integer* - function group database pointer |
| // portQueue - <EPTF_FreeBusyQueue> - FBQ to maintain status of ports |
| // within the group |
| // portStateQueue - <EPTF_FreeBusyQueue> - FBQ to maintain sending status |
| // of ports within the group |
| // useSSL - *boolean* - use ssl mode |
| // instantConnOpen - *boolean* - instant connection open mode |
| // instantConnClose - *boolean* - instant connection close mode |
| // buffer - *boolean* - buffer mode |
| // |
| // Detailed Comments: |
| // - |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| type record EPTF_HTTP_Transport_PortGroup { |
| charstring name, |
| |
| EPTF_HTTP_HostInformation baseLocalHostInformation, |
| EPTF_HTTP_HostInformation baseRemoteHostInformation, |
| integer currentPortId, |
| integer numberOfPorts, |
| integer localportStep, |
| integer remoteportStep, |
| |
| EPTF_HTTP_Transport_PortInfoList portDatabase, |
| integer listeningPortIdx, |
| |
| integer defaultFIdx, |
| |
| EPTF_FreeBusyQueue portQueue, |
| EPTF_FreeBusyQueue portStateQueue, |
| boolean useSSL, |
| boolean instantConnOpen, |
| boolean instantConnClose, |
| boolean buffer |
| } |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // const: c_HTTP_Transport_initPortGroup |
| // |
| // Purpose: |
| // - |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| const EPTF_HTTP_Transport_PortGroup c_HTTP_Transport_initPortGroup := |
| { |
| name := "", |
| baseLocalHostInformation := {"", -1}, |
| baseRemoteHostInformation := {"", -1}, |
| currentPortId := 0, |
| numberOfPorts := 0, |
| localportStep := -1, |
| remoteportStep := -1, |
| portDatabase := {}, |
| listeningPortIdx := -1, |
| defaultFIdx := -1, |
| portQueue := c_EPTF_emptyFreeBusyQueue, |
| portStateQueue := c_EPTF_emptyFreeBusyQueue, |
| useSSL := false, |
| instantConnOpen := false, |
| instantConnClose := false, |
| buffer := false |
| } |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Type: EPTF_HTTP_Transport_PortGroupList |
| // |
| // Purpose: |
| // Port group database of the HTTP transport component |
| // |
| // Elements: |
| // record of <EPTF_HTTP_Transport_PortGroup> |
| // |
| // Detailed Comments: |
| // - |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| type record of EPTF_HTTP_Transport_PortGroup EPTF_HTTP_Transport_PortGroupList; |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Type: EPTF_HTTP_Transport_NewPortGroup |
| // |
| // Purpose: |
| // Remote transport ASP API element for port group creation |
| // |
| // Elements: |
| // groupInfo - <EPTF_HTTP_Transport_GroupMode> - port group info |
| // |
| // Detailed Comments: |
| // - |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| type record EPTF_HTTP_Transport_NewPortGroup { |
| EPTF_HTTP_Transport_GroupMode groupInfo |
| } |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Type: EPTF_HTTP_Transport_DeletePortGroup |
| // |
| // Purpose: |
| // Remote transport ASP API element for port group deletion |
| // |
| // Elements: |
| // groupId - *integer* - port group index of created port group |
| // |
| // Detailed Comments: |
| // - |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| type record EPTF_HTTP_Transport_DeletePortGroup { |
| integer groupId |
| } |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Type: EPTF_HTTP_Transport_NewPort |
| // |
| // Purpose: |
| // Remote transport ASP API element for port creation |
| // |
| // Elements: |
| // portInfo - <EPTF_HTTP_Transport_PortMode> - port info |
| // |
| // Detailed Comments: |
| // - |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| type record EPTF_HTTP_Transport_NewPort { |
| EPTF_HTTP_Transport_PortMode portInfo |
| } |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Type: EPTF_HTTP_Transport_NewServerPort |
| // |
| // Purpose: |
| // Remote transport ASP API element for a server port creation |
| // |
| // Elements: |
| // portInfo - <EPTF_HTTP_Transport_ServerPortMode> - server port info |
| // |
| // Detailed Comments: |
| // - |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| type record EPTF_HTTP_Transport_NewServerPort { |
| EPTF_HTTP_Transport_ServerPortMode portInfo |
| } |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Type: EPTF_HTTP_Transport_DeletePort |
| // |
| // Purpose: |
| // Remote transport ASP API element for port deletion |
| // |
| // Elements: |
| // portId - *integer* - port group index of port to be deleted |
| // |
| // Detailed Comments: |
| // - |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| type record EPTF_HTTP_Transport_DeletePort { |
| integer portId |
| } |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Type: EPTF_HTTP_Transport_AddPort |
| // |
| // Purpose: |
| // Remote transport ASP API element for add port to a port group |
| // |
| // Elements: |
| // groupId - *integer* - port group index of group to which a new port |
| // is to be added |
| // |
| // Detailed Comments: |
| // - |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| type record EPTF_HTTP_Transport_AddPort { |
| integer groupId |
| } |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Type: EPTF_HTTP_Transport_RemovePort |
| // |
| // Purpose: |
| // Remote transport ASP API element for remove port from a port group |
| // |
| // Elements: |
| // groupId - *integer* - port group index of group from which a port |
| // is to be removed |
| // |
| // Detailed Comments: |
| // - |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| type record EPTF_HTTP_Transport_RemovePort { |
| integer groupId |
| } |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Type: EPTF_HTTP_Transport_Send |
| // |
| // Purpose: |
| // Remote transport ASP API element for send a message |
| // |
| // Elements: |
| // groupId - *integer* - the ID of the group on which the message |
| // should be sent |
| // sessionId - *integer* - entity index as session id for current send |
| // outgoingMessage - *octetstring* - outgoing message |
| // |
| // Detailed Comments: |
| // - |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| type record EPTF_HTTP_Transport_Send { |
| integer groupId, |
| integer sessionId, |
| octetstring outgoingMessage |
| } |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Type: EPTF_HTTP_Transport_ClosePortOfUser |
| // |
| // Purpose: |
| // Remote transport ASP API element for close port of user |
| // |
| // Elements: |
| // groupId - *integer* - the ID of the group on which the message |
| // should be sent |
| // sessionId - *integer* - entity index as session id for current send |
| // |
| // Detailed Comments: |
| // - |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| type record EPTF_HTTP_Transport_ClosePortOfUser { |
| integer groupId, |
| integer sessionId |
| } |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Type: EPTF_HTTP_Transport_FreePortOfUser |
| // |
| // Purpose: |
| // Remote transport ASP API element for free port of user |
| // |
| // Elements: |
| // groupId - *integer* - the ID of the group on which the message |
| // should be sent |
| // sessionId - *integer* - entity index as session id for current send |
| // |
| // Detailed Comments: |
| // - |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| type record EPTF_HTTP_Transport_FreePortOfUser { |
| integer groupId, |
| integer sessionId |
| } |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Type: EPTF_HTTP_Transport_Connect |
| // |
| // Purpose: |
| // Remote transport ASP API element for open a connection |
| // |
| // Elements: |
| // groupId - *integer* - the ID of the group whose connections should |
| // be opened |
| // sessionId - *integer* - entity index as session id for current open |
| // |
| // Detailed Comments: |
| // - |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| type record EPTF_HTTP_Transport_Connect { |
| integer groupId, |
| integer sessionId |
| } |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Type: EPTF_HTTP_Transport_Close |
| // |
| // Purpose: |
| // Remote transport ASP API element for close a connection |
| // |
| // Elements: |
| // groupId - *integer* - the ID of the group whose connections should |
| // be closed |
| // |
| // Detailed Comments: |
| // - |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| type record EPTF_HTTP_Transport_Close { |
| integer groupId |
| } |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Type: EPTF_HTTP_Transport_HalfClose |
| // |
| // Purpose: |
| // Remote transport ASP API element for half close a connection |
| // |
| // Elements: |
| // groupId - *integer* - the ID of the group whose connections should |
| // be half closed |
| // |
| // Detailed Comments: |
| // - |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| type record EPTF_HTTP_Transport_HalfClose { |
| integer groupId |
| } |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Type: EPTF_HTTP_Transport_Listen |
| // |
| // Purpose: |
| // Remote transport ASP API element for opening a listen connection |
| // |
| // Elements: |
| // groupId - *integer* - the ID of the server group |
| // |
| // Detailed Comments: |
| // - |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| type record EPTF_HTTP_Transport_Listen { |
| integer groupId |
| } |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Type: EPTF_HTTP_Transport_closePort |
| // |
| // Purpose: |
| // Remote transport ASP API element for closing a port |
| // |
| // Elements: |
| // groupId - *integer* - the ID of the group |
| // portId - *integer* - the port identifier |
| // |
| // |
| // Detailed Comments: |
| // - |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| type record EPTF_HTTP_Transport_closePort{ |
| integer groupId, |
| integer portId |
| } |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Type: EPTF_HTTP_Transport_SendResponse |
| // |
| // Purpose: |
| // Remote transport ASP API element for send a response. |
| // |
| // Elements: |
| // groupId - *integer* - the ID of the group on which the message |
| // should be sent |
| // portId - *integer* - the unique port identifier of the request |
| // msg - *octetstring* - outgoing response |
| // |
| // Detailed Comments: |
| // - |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| type record EPTF_HTTP_Transport_SendResponse{ |
| integer groupId, |
| integer portId, |
| integer seqNum, |
| octetstring msg |
| } |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Type: EPTF_HTTP_Transport_Result |
| // |
| // Purpose: |
| // Remote transport ASP API element for result notification |
| // |
| // Elements: |
| // groupId - *integer* - the ID of the group whose port got the event |
| // resultType - *integer* - event type |
| // |
| // Detailed Comments: |
| // - |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| type record EPTF_HTTP_Transport_Result { |
| integer groupId, |
| integer sessionId, |
| integer resultType |
| } |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Type: EPTF_HTTP_Transport_Receive |
| // |
| // Purpose: |
| // Remote transport ASP API element for message reception handling |
| // |
| // Elements: |
| // groupId - *integer* - port group identifier of the request |
| // sessionId - *integer* - unique id of the request |
| // seqNum- *integer* - sequence number of the request |
| // reveivedMessage - *octetstring* - received message |
| // |
| // Detailed Comments: |
| // - |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| type record EPTF_HTTP_Transport_Receive { |
| integer groupId, |
| integer sessionId, |
| integer seqNum, |
| octetstring reveivedMessage |
| } |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Type: EPTF_HTTP_Transport_Error |
| // |
| // Purpose: |
| // Remote transport ASP API element for error socket notification |
| // |
| // Elements: |
| // groupId - *integer* - the ID of the group whose port got the event |
| // result - <Result> - Contains IPL4 Result message |
| // |
| // Detailed Comments: |
| // - |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| type record EPTF_HTTP_Transport_Error { |
| integer groupId, |
| integer sessionId, |
| Result result |
| } |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Type: EPTF_HTTP_Transport_ListenEvent |
| // |
| // Purpose: |
| // Remote transport ASP API element for listen socket event notification |
| // |
| // Elements: |
| // groupId - *integer* - port group ID |
| // hostInfo - <EPTF_HTTP_HostInformation> - listening address and port |
| // eventType - *integer* - event type |
| // |
| // Detailed Comments: |
| // - |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| type record EPTF_HTTP_Transport_ListenEvent{ |
| integer groupId, |
| EPTF_HTTP_HostInformation hostInfo, |
| integer eventType |
| } |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Type: EPTF_HTTP_Transport_ListenError |
| // |
| // Purpose: |
| // Remote transport ASP API element for listen socket error notification |
| // |
| // Elements: |
| // groupId - *integer* - port group ID |
| // hostInfo - <EPTF_HTTP_HostInformation> - listening address and port |
| // transportError - <EPTF_HTTP_Error> - error |
| // |
| // Detailed Comments: |
| // - |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| type record EPTF_HTTP_Transport_ListenError{ |
| integer groupId, |
| EPTF_HTTP_HostInformation hostInfo, |
| EPTF_HTTP_Error transportError |
| } |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Type: EPTF_HTTP_Transport_PT |
| // |
| // Purpose: |
| // EPTF HTTP internal communication port |
| // |
| // Elements: |
| // EPTF_HTTP_Transport_NewPortGroup |
| // EPTF_HTTP_Transport_NewPort |
| // EPTF_HTTP_Transport_NewServerPort |
| // EPTF_HTTP_Transport_DeletePortGroup |
| // EPTF_HTTP_Transport_DeletePort |
| // EPTF_HTTP_Transport_AddPort |
| // EPTF_HTTP_Transport_RemovePort |
| // EPTF_HTTP_Transport_Send |
| // EPTF_HTTP_Transport_ClosePortOfUser |
| // EPTF_HTTP_Transport_FreePortOfUser |
| // EPTF_HTTP_Transport_Connect |
| // EPTF_HTTP_Transport_Close |
| // EPTF_HTTP_Transport_HalfClose |
| // EPTF_HTTP_Transport_Listen |
| // EPTF_HTTP_Transport_SendResponse |
| // EPTF_HTTP_Transport_Result |
| // EPTF_HTTP_Transport_Receive |
| // EPTF_HTTP_Transport_Error |
| // EPTF_HTTP_Transport_ListenEvent |
| // EPTF_HTTP_Transport_ListenError |
| // EPTF_HTTP_Transport_closePort |
| // integer |
| // |
| // Detailed Comments: |
| // - |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| type port EPTF_HTTP_Transport_PT message |
| { |
| inout EPTF_HTTP_Transport_NewPortGroup; |
| inout EPTF_HTTP_Transport_NewPort; |
| inout EPTF_HTTP_Transport_NewServerPort; |
| inout EPTF_HTTP_Transport_DeletePortGroup; |
| inout EPTF_HTTP_Transport_DeletePort; |
| inout EPTF_HTTP_Transport_AddPort; |
| inout EPTF_HTTP_Transport_RemovePort; |
| inout EPTF_HTTP_Transport_Send; |
| inout EPTF_HTTP_Transport_ClosePortOfUser; |
| inout EPTF_HTTP_Transport_FreePortOfUser; |
| inout EPTF_HTTP_Transport_Connect; |
| inout EPTF_HTTP_Transport_Close; |
| inout EPTF_HTTP_Transport_HalfClose; |
| inout EPTF_HTTP_Transport_Listen; |
| inout EPTF_HTTP_Transport_SendResponse |
| inout EPTF_HTTP_Transport_Result; |
| inout EPTF_HTTP_Transport_Receive; |
| inout EPTF_HTTP_Transport_Error; |
| inout EPTF_HTTP_Transport_ListenEvent; |
| inout EPTF_HTTP_Transport_ListenError; |
| inout EPTF_HTTP_Transport_closePort; |
| inout integer; |
| } with {extension "internal"} |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Type: EPTF_HTTP_Base_CTList |
| // |
| // Purpose: |
| // Routing component CT list |
| // |
| // Elements: |
| // record of <EPTF_Base_CT> |
| // |
| // Detailed Comments: |
| // - |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| type record of EPTF_Base_CT EPTF_HTTP_Base_CTList; |
| } |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Group: EPTF_HTTP_LocalTransport |
| // |
| // Purpose: |
| // The definitions of the EPTF HTTP Local Transport |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| group EPTF_HTTP_LocalTransport { |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Type: EPTF_HTTP_LocalTransport_CT |
| // |
| // Purpose: |
| // EPTF HTTP local transport component |
| // |
| // Extends: |
| // EPTF_MessageBufferManager_CT |
| // |
| // EPTF_HTTP_LoggerClient_CT |
| // |
| // EPTF_HTTP_Transport_Logging_CT (this extends EPTF_Logging_CT) |
| // |
| // EPTF_CommPort_IPL4_CT |
| // |
| // EPTF_Base_CT |
| // |
| // Ports: |
| // pf_EPTF_HTTP_LocalTransport_commPort - <EPTF_HTTP_Transport_PT> - local transport communication port |
| // |
| // Timers: |
| // - |
| // |
| // Elements: |
| // vf_EPTF_HTTP_LocalTransport_receive - <EPTF_HTTP_messageProcess_FT> - |
| // receive message callback function pointer |
| // vf_EPTF_HTTP_LocalTransport_eventReceive - <EPTF_HTTP_eventReceive_FT> - |
| // receive event callback function pointer |
| // vf_EPTF_HTTP_LocalTransport_socketErrorReceive - <EPTF_HTTP_socketErrorReceive_FT> - |
| // receive socket error callback function pointer |
| // vf_EPTF_HTTP_LocalTransport_listenSocketEvent - <EPTF_HTTP_listenSocketEvent_FT> - |
| // receive lisent socket event callback function pointer |
| // vf_EPTF_HTTP_LocalTransport_listenSocketError - <EPTF_HTTP_listenSocketError_FT> - |
| // receive lisent socket error callback function pointer |
| // vf_EPTF_HTTP_messageSentHook - <fcb_EPTF_HTTP_messageSentHook> - |
| // callback function that is invoked after each HTTP message is sent |
| // |
| // v_EPTF_HTTP_LocalTransport_loggingEnabled - *integer* - |
| // the Variable of the GUI logging |
| // v_EPTF_HTTP_LocalTransport_guiEnabled - *boolean* - GUI Logging enabled |
| // v_EPTF_HTTP_LocalTransport_initialized - *boolean* - |
| // The component initialized variable |
| // v_EPTF_HTTPLocalTransport_lengthCalculationFunctions - <EPTF_HTTP_LocalTransport_MessageLengthCalculationFunctionList> - |
| // message length calcualtion function list |
| // |
| // v_EPTF_HTTP_LocalTransport_selfName - *charstring* - self name of the component |
| // v_EPTF_HTTP_Transport_groupQueue - <EPTF_FreeBusyQueue> - FBQ to maintain port groups |
| // v_EPTF_HTTP_Transport_portDB - <EPTF_HTTP_Transport_PortGroupList> - port group database |
| // v_EPTF_HTTP_Transport_functionDB - <EPTF_HTTP_Transport_FunctionList> - function database |
| // |
| // v_EPTF_HTTP_Transport_groupName2Idx_HM - *integer* - group name to group index hash map handle |
| // v_EPTF_HTTP_Transport_functions2Idx_HM - *integer* - function set to function database hash map handle |
| // v_EPTF_HTTP_Transport_remoteHostHashMap - *integer* - remote host hash map handle |
| // v_EPTF_HTTP_Transport_localHostHashMap - *integer* - local host hash map handle |
| // v_EPTF_HTTP_Transport_connId2GroupId_HM - *integer* - connection id to group index hash map handle |
| // v_EPTF_HTTP_Transport_connId2PortId_HM - *integer* - connection id to port index hash map handle |
| // |
| // v_nameIdx - *integer* - variable to store current highest port group name index |
| // |
| // v_resultNoWarning - <Result> - dummy variable to suppress warnings |
| // v_boolNoWarning - *boolean* - dummy variable to suppress warnings |
| // v_intNoWarning - *integer* - dummy variable to suppress warnings |
| // |
| // v_EPTF_HTTP_Transport_localHostInformationList - <EPTF_HTTP_HostInformationList> - local host |
| // information database |
| // v_EPTF_HTTP_Transport_remoteHostInformationList - <EPTF_HTTP_HostInformationList> - remote |
| // host information database |
| // |
| // v_EPTF_HTTP_Transport_OutgoingMessage - <EPTF_CommPort_IPL4_ASP_OutgoingMessage> - |
| // outgoing message |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| type component EPTF_HTTP_LocalTransport_CT extends |
| EPTF_MessageBufferManager_CT, |
| EPTF_HTTP_Transport_Logging_CT, |
| EPTF_CommPort_IPL4_CT, |
| EPTF_Base_CT |
| { |
| var EPTF_HTTP_messageProcess_FT vf_EPTF_HTTP_LocalTransport_receive := null; |
| var EPTF_HTTP_eventReceive_FT vf_EPTF_HTTP_LocalTransport_eventReceive := null; |
| var EPTF_HTTP_socketErrorReceive_FT vf_EPTF_HTTP_LocalTransport_socketErrorReceive := null; |
| |
| var EPTF_HTTP_listenSocketEvent_FT vf_EPTF_HTTP_LocalTransport_listenSocketEvent := null; |
| var EPTF_HTTP_listenSocketError_FT vf_EPTF_HTTP_LocalTransport_listenSocketError := null |
| var fcb_EPTF_HTTP_messageSentHook vf_EPTF_HTTP_messageSentHook := null; |
| |
| var integer v_EPTF_HTTP_LocalTransport_loggingEnabled := -1; |
| var boolean v_EPTF_HTTP_LocalTransport_guiEnabled := false; |
| var boolean v_EPTF_HTTP_LocalTransport_initialized := false; |
| var EPTF_HTTP_LocalTransport_MessageLengthCalculationFunctionList v_EPTF_HTTPLocalTransport_lengthCalculationFunctions := {}; |
| |
| var EPTF_HTTP_Transport_GetGroupAndPort_FT vf_getGroupAndPort := null; |
| var EPTF_HTTP_Transport_GetGroup_FT vf_getGroup := null; |
| |
| |
| var charstring v_EPTF_HTTP_LocalTransport_selfName := "EPTF_HTTP_Transport"; |
| |
| var EPTF_FreeBusyQueue v_EPTF_HTTP_Transport_groupQueue; |
| var EPTF_HTTP_Transport_PortGroupList v_EPTF_HTTP_Transport_portDB := {}; |
| var integer v_EPTF_HTTP_Transport_groupName2Idx_HM := -1; |
| |
| var EPTF_HTTP_Transport_FunctionList v_EPTF_HTTP_Transport_functionDB := {}; |
| var integer v_EPTF_HTTP_Transport_functions2Idx_HM := -1; |
| |
| var integer v_EPTF_HTTP_Transport_connId2GroupId_HM := -1; |
| var integer v_EPTF_HTTP_Transport_connId2PortId_HM := -1; |
| var integer v_EPTF_HTTP_Transport_sessId2PortId_HM := -1; |
| var integer v_EPTF_HTTP_Transport_portId2Idx_HM := -1; |
| |
| var integer v_nameIdx := 0; |
| var Result v_resultNoWarning; |
| var boolean v_boolNoWarning; |
| var integer v_intNoWarning; |
| |
| var EPTF_HTTP_HostInformationList v_EPTF_HTTP_Transport_localHostInformationList := {}; |
| var integer v_EPTF_HTTP_Transport_localHostHashMap := -1; |
| |
| var EPTF_HTTP_HostInformationList v_EPTF_HTTP_Transport_remoteHostInformationList := {}; |
| var integer v_EPTF_HTTP_Transport_remoteHostHashMap := -1; |
| |
| var integer v_EPTF_HTTP_Transport_lastReceivedGroup := -1; |
| var EPTF_CommPort_IPL4_ASP_OutgoingMessage v_EPTF_HTTP_Transport_OutgoingMessage; |
| |
| var integer v_EPTF_HTTP_Transport_bufferSize := tsp_EPTF_HTTP_bufferSize; |
| |
| port EPTF_HTTP_Transport_PT pf_EPTF_HTTP_LocalTransport_commPort; |
| } |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Type: EPTF_HTTP_LocalTransport_CTList |
| // |
| // Purpose: |
| // Remote transport CT list |
| // |
| // Elements: |
| // record of <EPTF_HTTP_LocalTransport_CT> |
| // |
| // Detailed Comments: |
| // - |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| type record of EPTF_HTTP_LocalTransport_CT EPTF_HTTP_LocalTransport_CTList; |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Type: EPTF_HTTP_LocalTransport_MessageLengthCalculationFunctionList |
| // |
| // Purpose: |
| // Message length calculation function database |
| // |
| // Elements: |
| // record of <f_IPL4_getMsgLen> |
| // |
| // Detailed Comments: |
| // - |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| type record of f_IPL4_getMsgLen |
| EPTF_HTTP_LocalTransport_MessageLengthCalculationFunctionList; |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // const: c_EPTF_HTTP_LocalTransport_idx_getMessageLength |
| // |
| // Purpose: |
| // - |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| const integer c_EPTF_HTTP_LocalTransport_idx_getMessageLength := 0; |
| |
| /////////////////////////////////////////////////////////// |
| // const: c_EPTF_HTTP_LocalTransport_idx_getMessageLength4Diameter |
| // |
| // Purpose: |
| // - |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| const integer c_EPTF_HTTP_LocalTransport_idx_getMessageLength4Diameter := 1; |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // const: c_EPTF_HTTP_LocalTransport_idx_getMessageLengthChunkedCoding |
| // |
| // Purpose: |
| // - |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| const integer c_EPTF_HTTP_LocalTransport_idx_getMessageLengthChunkedCoding := 2; |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // const: Hash map name constants for Local transport |
| // |
| // Purpose: |
| // - |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| const charstring c_EPTF_HTTP_LocalTransport_HashMap_groupName2Idx := "EPTF HTTP: Group name to group index HashMap"; |
| const charstring c_EPTF_HTTP_LocalTransport_HashMap_fnGrp2Idx := "EPTF HTTP: Function group to index HashMap"; |
| const charstring c_EPTF_HTTP_LocalTransport_HashMap_localHost := "EPTF HTTP: Local Host HashMap"; |
| const charstring c_EPTF_HTTP_LocalTransport_HashMap_remoteHost := "EPTF HTTP: Remote Host HashMap"; |
| const charstring c_EPTF_HTTP_LocalTransport_HashMap_connId2PortGrp := "EPTF HTTP: Connection id to Port group index HashMap"; |
| const charstring c_EPTF_HTTP_LocalTransport_HashMap_connId2Port := "EPTF HTTP: Connection id to Port index within port group HashMap"; |
| const charstring c_EPTF_HTTP_LocalTransport_HashMap_sessId2Port := "EPTF HTTP: Session id to Port index within port group HashMap"; |
| const charstring c_EPTF_HTTP_LocalTransport_HashMap_portId2Idx := "EPTF HTTP: Port id to Port index within port group HashMap"; |
| const charstring c_EPTF_HTTP_LocalTransport_HashMap_isSlotBusy := "EPTF HTTP: Buffer queue HashMap"; |
| const charstring c_EPTF_HTTP_LocalTransport_HashMap_seqNum2messageIdx := "EPTF HTTP: Sequence number to message queue index HashMap"; |
| } |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Group: EPTF_HTTP_RemoteTransport |
| // |
| // Purpose: |
| // The definitions of the EPTF HTTP Remote Transport |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| group EPTF_HTTP_RemoteTransport |
| { |
| /////////////////////////////////////////////////////////////////////////////// |
| // Type: EPTF_HTTP_RemoteTransport_CT |
| // |
| // Purpose: |
| // EPTF HTTP remote transport component |
| // |
| // Extends: |
| // EPTF_Base_CT |
| // EPTF_HTTP_Transport_Logging_CT (this extends EPTF_Logging_CT) |
| // |
| // Ports: |
| // v_EPTF_HTTP_RemoteTransport_commPort - <EPTF_HTTP_Transport_PT> - |
| // internal communication port |
| // |
| // Timers: |
| // - |
| // |
| // Elements: |
| // v_EPTF_HTTP_RemoteTransport_selfName - *charstring* - self name of the |
| // component |
| // v_EPTF_HTTP_RemoteTransport_result - <EPTF_HTTP_Transport_Result> - |
| // Remote transport internal communication ASP for incoming events |
| // v_EPTF_HTTP_RemoteTransport_receive - <EPTF_HTTP_Transport_Receive> - |
| // Remote transport internal communication ASP for incoming messages |
| // v_EPTF_HTTP_RemoteTransport_error - <EPTF_HTTP_Transport_Error> - |
| // Remote transport internal communication ASP for error messages |
| // v_EPTF_HTTP_RemoteTransport_listenEvent - <EPTF_HTTP_Transport_ListenEvent> - |
| // Remote transport internal communication ASP for listening socket events |
| // v_EPTF_HTTP_RemoteTransport_listenError - <EPTF_HTTP_Transport_ListenError> - |
| // Remote transport internal communication ASP for listening socket errors |
| // vf_EPTF_HTTP_RemoteTransport_handleReceive - <EPTF_HTTP_messageProcess_FT> - |
| // receive callback function pointer |
| // vf_EPTF_HTTP_RemoteTransport_eventReceive - <EPTF_HTTP_eventReceive_FT> - |
| // receive event callback function pointer |
| // vf_EPTF_HTTP_RemoteTransport_socketErrorReceive - <EPTF_HTTP_socketErrorReceive_FT> - |
| // receive socket error callback function pointer |
| // v_EPTF_HTTP_RemoteTransport_default - *default* - remote transport |
| // default altstep handler |
| // v_EPTF_HTTP_RemoteTransport_initialized - *boolean* - remote transport |
| // component initialization state |
| // v_EPTF_HTTP_RemoteTransport_transportIdToConnId - *integer* - hash map |
| // index |
| // v_EPTF_HTTP_Mapper_halfClose - <EPTF_HTTP_Transport_HalfClose> - HTTP |
| // half close message ASP |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| type component EPTF_HTTP_RemoteTransport_CT extends |
| EPTF_Base_CT, |
| EPTF_HTTP_Transport_Logging_CT, |
| EPTF_HashMap_CT |
| { |
| var charstring v_EPTF_HTTP_RemoteTransport_selfName := "EPTF_HTTP_RemoteTransport"; |
| |
| var EPTF_HTTP_Transport_Result v_EPTF_HTTP_RemoteTransport_result; |
| var EPTF_HTTP_Transport_Receive v_EPTF_HTTP_RemoteTransport_receive; |
| var EPTF_HTTP_Transport_Error v_EPTF_HTTP_RemoteTransport_error; |
| |
| var EPTF_HTTP_Transport_ListenEvent v_EPTF_HTTP_RemoteTransport_listenEvent; |
| var EPTF_HTTP_Transport_ListenError v_EPTF_HTTP_RemoteTransport_listenError; |
| |
| var EPTF_HTTP_messageProcess_FT vf_EPTF_HTTP_RemoteTransport_handleReceive := null; |
| var EPTF_HTTP_eventReceive_FT vf_EPTF_HTTP_RemoteTransport_eventReceive := null; |
| var EPTF_HTTP_socketErrorReceive_FT vf_EPTF_HTTP_RemoteTransport_socketErrorReceive := null; |
| |
| var EPTF_HTTP_listenSocketEvent_FT vf_EPTF_HTTP_RemoteTransport_listenSocketEvent := null; |
| var EPTF_HTTP_listenSocketError_FT vf_EPTF_HTTP_RemoteTransport_listenSocketError := null |
| |
| var default v_EPTF_HTTP_RemoteTransport_default; |
| |
| var boolean v_EPTF_HTTP_RemoteTransport_initialized := false; |
| var integer v_EPTF_HTTP_RemoteTransport_transportIdToConnId := -1; |
| |
| port EPTF_HTTP_Transport_PT v_EPTF_HTTP_RemoteTransport_commPort; |
| } |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Type: EPTF_HTTP_RemoteTransport_CTList |
| // |
| // Purpose: |
| // Remote transport CT list |
| // |
| // Elements: |
| // record of <EPTF_HTTP_RemoteTransport_CT> |
| // |
| // Detailed Comments: |
| // - |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| type record of EPTF_HTTP_RemoteTransport_CT EPTF_HTTP_RemoteTransport_CTList; |
| } |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // const: Hash map name constants for Remote transport |
| // |
| // Purpose: |
| // - |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| const charstring c_EPTF_HTTP_RemoteTransport_HashMap_transportId2ConnId := "EPTF HTTP: Transport ID To Connection ID HashMap"; |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Group: EPTF_HTTP_Mapper |
| // |
| // Purpose: |
| // The definitions of the EPTF HTTP Mapper |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| group EPTF_HTTP_Mapper |
| { |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Type: EPTF_HTTP_Mapper_CT |
| // |
| // Purpose: |
| // EPTF HTTP mapper component |
| // |
| // Extends: |
| // EPTF_HTTP_LocalTransport_CT |
| // |
| // EPTF_Routing_CT |
| // |
| // EPTF_Base_CT |
| // |
| // Ports: |
| // v_EPTF_HTTP_Mapper_commPort - <EPTF_HTTP_Transport_PT> - internal |
| // communication port |
| // |
| // Timers: |
| // - |
| // |
| // Elements: |
| // v_EPTF_HTTP_Mapper_componentId - *integer* - component id for routing |
| // v_EPTF_HTTP_Mapper_default - *default* - handle of the Mapper's |
| // default altstep |
| // v_EPTF_HTTP_Mapper_componentRef - <EPTF_Base_CT> - store remote load |
| // generator component reference for routing |
| // v_EPTF_HTTP_Mapper_hashMapIdx - *integer* - mapper routing hash map |
| // v_EPTF_HTTP_Mapper_initialized - *boolean* - mapper initialization |
| // state |
| // v_EPTF_HTTP_Mapper_newPortGroup - <EPTF_HTTP_Transport_NewPortGroup> - |
| // HTTP new port group ASP |
| // v_EPTF_HTTP_Mapper_deletePortGroup - <EPTF_HTTP_Transport_DeletePortGroup> - |
| // HTTP delete port group ASP |
| // v_EPTF_HTTP_Mapper_newPort - <EPTF_HTTP_Transport_NewPort> - HTTP |
| // new port ASP |
| // v_EPTF_HTTP_Mapper_newServerPort - <EPTF_HTTP_Transport_NewServerPort> - HTTP |
| // new server port ASP |
| // v_EPTF_HTTP_Mapper_deletePort - <EPTF_HTTP_Transport_DeletePort> - |
| // HTTP delete port ASP |
| // v_EPTF_HTTP_Mapper_addPort - <EPTF_HTTP_Transport_AddPort> - HTTP |
| // HTTP add port from port group ASP |
| // v_EPTF_HTTP_Mapper_removePort - <EPTF_HTTP_Transport_RemovePort> - |
| // HTTP remove port from port group ASP |
| // v_EPTF_HTTP_Mapper_sendMessage - <EPTF_HTTP_Transport_Send> - HTTP |
| // HTTP send message ASP |
| // v_EPTF_HTTP_Mapper_connect - <EPTF_HTTP_Transport_Connect> - HTTP |
| // connect message ASP |
| // v_EPTF_HTTP_Mapper_close - <EPTF_HTTP_Transport_Close> - HTTP close |
| // message ASP |
| // v_EPTF_HTTP_Mapper_halfClose - <EPTF_HTTP_Transport_HalfClose> - HTTP |
| // half close message ASP |
| // v_EPTF_HTTP_Mapper_listen - <EPTF_HTTP_Transport_Listen> - HTTP |
| // listen message ASP |
| // v_EPTF_HTTP_Mapper_sendResponse - <EPTF_HTTP_Transport_SendResponse> - HTTP |
| // send response ASP |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| type component EPTF_HTTP_Mapper_CT extends |
| EPTF_HTTP_LocalTransport_CT, |
| EPTF_Routing_CT, |
| EPTF_Base_CT |
| { |
| port EPTF_HTTP_Transport_PT v_EPTF_HTTP_Mapper_commPort; |
| |
| var integer v_EPTF_HTTP_Mapper_sessionId; |
| var integer v_EPTF_HTTP_Mapper_portId; |
| |
| var EPTF_IntegerList v_EPTF_HTTP_Mapper_componentId; |
| var default v_EPTF_HTTP_Mapper_default; |
| var EPTF_Base_CT v_EPTF_HTTP_Mapper_componentRef; |
| var integer v_EPTF_HTTP_Mapper_hashMapIdx := -1; |
| var boolean v_EPTF_HTTP_Mapper_initialized := false; |
| |
| var EPTF_BooleanList v_EPTF_HTTP_Mapper_routingSetDatabase := {}; |
| var EPTF_HTTP_Mapper_Routing_Database v_EPTF_HTTP_Mapper_inRoutingDatabase := {}; |
| |
| var EPTF_HTTP_MapperRoutingUri2LGenDB v_EPTF_HTTP_MapperRoutingUri2LGenDB; |
| private var EPTF_HTTP_MapperRoutingUri2LGen_GetUri_FT fcb_EPTF_HTTP_MapperRoutingUri2LGen_GetUri := null; |
| |
| var EPTF_HTTP_Transport_NewPortGroup v_EPTF_HTTP_Mapper_newPortGroup; |
| var EPTF_HTTP_Transport_DeletePortGroup v_EPTF_HTTP_Mapper_deletePortGroup; |
| var EPTF_HTTP_Transport_NewPort v_EPTF_HTTP_Mapper_newPort; |
| var EPTF_HTTP_Transport_NewServerPort v_EPTF_HTTP_Mapper_newServerPort; |
| var EPTF_HTTP_Transport_DeletePort v_EPTF_HTTP_Mapper_deletePort; |
| var EPTF_HTTP_Transport_AddPort v_EPTF_HTTP_Mapper_addPort; |
| var EPTF_HTTP_Transport_RemovePort v_EPTF_HTTP_Mapper_removePort; |
| var EPTF_HTTP_Transport_Connect v_EPTF_HTTP_Mapper_connect; |
| var EPTF_HTTP_Transport_Send v_EPTF_HTTP_Mapper_sendMessage; |
| var EPTF_HTTP_Transport_ClosePortOfUser v_EPTF_HTTP_Mapper_closePortOfUser; |
| var EPTF_HTTP_Transport_FreePortOfUser v_EPTF_HTTP_Mapper_freePortOfUser; |
| var EPTF_HTTP_Transport_Close v_EPTF_HTTP_Mapper_close; |
| var EPTF_HTTP_Transport_HalfClose v_EPTF_HTTP_Mapper_halfClose; |
| var EPTF_HTTP_Transport_Listen v_EPTF_HTTP_Mapper_listen; |
| var EPTF_HTTP_Transport_SendResponse v_EPTF_HTTP_Mapper_sendResponse; |
| var EPTF_HTTP_Transport_closePort v_EPTF_HTTP_Mapper_closePort; |
| } |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Type: EPTF_HTTP_Mapper_Routing |
| // |
| // Purpose: |
| // Routing setup element |
| // |
| // Elements: |
| // groupId - *integer* - group index |
| // compIdList - <EPTF_IntegerList> - component id list casted to integer |
| // |
| // Detailed Comments: |
| // - |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| type record EPTF_HTTP_Mapper_Routing { |
| integer groupId, |
| EPTF_IntegerList compIdList |
| } |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Type: EPTF_HTTP_Mapper_Routing |
| // |
| // Purpose: |
| // Routing setup list |
| // |
| // Elements: |
| // record of <EPTF_HTTP_Mapper_Routing> |
| // |
| // Detailed Comments: |
| // - |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| type record of EPTF_HTTP_Mapper_Routing EPTF_HTTP_Mapper_RoutingList; |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Type: EPTF_HTTP_Mapper_Routing_DBE |
| // |
| // Purpose: |
| // Routing database element |
| // |
| // Elements: |
| // ptr - *integer* - next component id list pointer to send |
| // size - *integer* - component id list size |
| // compIdList - <EPTF_IntegerList> - component id list casted to integer |
| // |
| // Detailed Comments: |
| // - |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| type record EPTF_HTTP_Mapper_Routing_DBE { |
| integer ptr, |
| integer size, |
| EPTF_IntegerList compIdList |
| } |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // const: c_EPTF_HTTP_initRoutingDBE |
| // |
| // Purpose: |
| // - |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| const EPTF_HTTP_Mapper_Routing_DBE c_EPTF_HTTP_initRoutingDBE := |
| { |
| ptr := 0, |
| size := 0, |
| compIdList := {} |
| } |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Type: EPTF_HTTP_Mapper_Routing_Database |
| // |
| // Purpose: |
| // Routing database |
| // |
| // Elements: |
| // record of <EPTF_HTTP_Mapper_Routing_DBE> |
| // |
| // Detailed Comments: |
| // - |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| type record of EPTF_HTTP_Mapper_Routing_DBE EPTF_HTTP_Mapper_Routing_Database; |
| |
| const charstring c_EPTF_HTTP_Transport_hashMapName_uri2idxHash := "SIP: uri2Idx"; |
| type record EPTF_HTTP_MapperRoutingUri2LGenDB { |
| integer uri2lgenIdxHash |
| } |
| |
| type function EPTF_HTTP_MapperRoutingUri2LGen_GetUri_FT() runs on self return charstring; |
| |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // const: Hash map name constants for Mapper |
| // |
| // Purpose: |
| // - |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| const charstring c_EPTF_HTTP_Mapper_HashMap_routing := "EPTF HTTP: Routing HashMap"; |
| } |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Group: EPTF_HTTP_Transport_Logging |
| // |
| // Purpose: |
| // The definitions of the EPTF HTTP Transport Logging |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| group EPTF_HTTP_Transport_Logging |
| { |
| /////////////////////////////////////////////////////////////////////////////// |
| // Type: EPTF_HTTP_Transport_Logging_CT |
| // |
| // Purpose: |
| // Common logging component for Local/Remote transport |
| // |
| // Extends: |
| // EPTF_Logging_CT |
| // |
| // Ports: |
| // - |
| // |
| // Timers: |
| // - |
| // |
| // Elements: |
| // v_EPTF_HTTP_Transport_loggingMaskId - *integer* - logging mask id |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| type component EPTF_HTTP_Transport_Logging_CT extends EPTF_Logging_CT |
| { |
| // logging |
| var integer v_EPTF_HTTP_Transport_loggingMaskId := c_EPTF_Logging_invalidMaskId; |
| |
| var integer v_EPTF_HTTP_Transport_bufferLoggingMaskId := c_EPTF_Logging_invalidMaskId; |
| } |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Constant: c_EPTF_HTTP_Transport_loggingEventClasses |
| // |
| // Purpose: |
| // list of logging event class names used on the EPTF HTTP |
| // Transport component |
| // |
| // Detailed Comments: |
| // <EPTF_Logging_EventClassPrefixList> { "Error", "Warning", "Debug" } |
| /////////////////////////////////////////////////////////////////////////////// |
| const EPTF_Logging_EventClassPrefixList |
| c_EPTF_HTTP_Transport_loggingEventClasses := { "Error", "Warning", "Debug", "BufferWarning", "BufferDebug"}; |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Constant: c_EPTF_HTTP_Transport_loggingClassIdx_Error |
| // |
| // Purpose: |
| // logging class index for Error |
| // |
| // Detailed Comments: |
| // *0* |
| /////////////////////////////////////////////////////////////////////////////// |
| const integer c_EPTF_HTTP_Transport_loggingClassIdx_Error := 0; |
| |
| /////////////////////////////////////////////////////////////////////////////// |
| // Constant: c_EPTF_HTTP_Transport_loggingClassIdx_Warning |
| // |
| // Purpose: |
| // logging class index for Warning |
| // |
| // Detailed Comments: |
| // *1* |
| /////////////////////////////////////////////////////////////////////////////// |
| const integer c_EPTF_HTTP_Transport_loggingClassIdx_Warning := 1; |
| |
| /////////////////////////////////////////////////////////// |
| // Constant: c_EPTF_HTTP_Transport_loggingClassIdx_Debug |
| // |
| // Purpose: |
| // logging class index for Debug |
| // |
| // Detailed Comments: |
| // *2* |
| /////////////////////////////////////////////////////////////////////////////// |
| const integer c_EPTF_HTTP_Transport_loggingClassIdx_Debug := 2; |
| |
| /////////////////////////////////////////////////////////// |
| // Constant: c_EPTF_HTTP_Transport_loggingClassIdx_BufferWarning |
| // |
| // Purpose: |
| // logging class index for Buffer debug warning logging. |
| // |
| // Detailed Comments: |
| // *0* |
| /////////////////////////////////////////////////////////////////////////////// |
| const integer c_EPTF_HTTP_Transport_loggingClassIdx_BufferWarning := 3; |
| |
| /////////////////////////////////////////////////////////// |
| // Constant: c_EPTF_HTTP_Transport_loggingClassIdx_BufferDebug |
| // |
| // Purpose: |
| // logging class index for Buffer debug logging. |
| // |
| // Detailed Comments: |
| // *1* |
| /////////////////////////////////////////////////////////////////////////////// |
| const integer c_EPTF_HTTP_Transport_loggingClassIdx_BufferDebug := 4; |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Type: fcb_EPTF_HTTP_messageSentHook |
| // |
| // Purpose: Message hook for post-processing HTTP message sent. |
| // |
| /////////////////////////////////////////////////////////// |
| type function fcb_EPTF_HTTP_messageSentHook(in integer pl_eIdx, in octetstring pl_httpMessage) runs on self; |
| |
| }//end of module |
| with { |
| extension "version <RnXnn>" |
| } |
| |