<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Create a tcp connection in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-a-tcp-connection/m-p/12283177#M1988898</link>
    <description>&lt;P&gt;I am using this code to create a class managing the connections to devices available with telnet.&lt;BR /&gt;I am following this &lt;/P&gt;
  &lt;P&gt;&lt;A href="https://help.sap.com/viewer/05d041d3df1a4595a3c45f57c15e2325/7.52.6/en-US/fb4c69f8c58644598b7240f2c825d064.html" target="test_blank"&gt;https://help.sap.com/viewer/05d041d3df1a4595a3c45f57c15e2325/7.52.6/en-US/fb4c69f8c58644598b7240f2c825d064.html&lt;/A&gt;&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;  
  DATA: lo_client          TYPE REF TO if_apc_wsp_client,
        lo_event_handler   TYPE REF TO ZMY_OWN_APC_HANDLER,
        port    TYPE string,
        lv_frame           TYPE apc_tcp_frame.
  
            lv_frame-frame_type = if_apc_tcp_frame_types=&amp;gt;co_frame_type_terminator. 
            lv_frame-terminator = '0A'. " 


  lo_client = cl_apc_tcp_client_manager=&amp;gt;create( i_host = me-&amp;gt;host " 10.X.X.X
      i_port = port " '20000'
      i_frame = lv_frame
      i_event_handler = lo_event_handler
  )&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;I have an error &lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;Creation of APC client object has failed with error text: Argument not found.

OTR-Based Exception of Class: CX_APC_WSP_CLIENT_ERROR&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;It seems that this error comes from cl_http_client=&amp;gt;create_by_url&lt;/P&gt;
  &lt;P&gt;I checked the code of cl_apc_tcp_client_manager I find that it create lo_apc_client of type cl_apc_wsp_client which try to create a http client ( cl_http_client=&amp;gt;create) which fail raising cx_apc_wsp_client_error with textid : cx_apc_wsp_client_error=&amp;gt;client_create_failed. I was wondering if there is a way to create a tcp connection not related to Web Socket.&lt;/P&gt;
  &lt;P&gt;Is cl_apc_tcp_client_manager the right tool to create tcp connexion ?&lt;/P&gt;
  &lt;P&gt;What would you use to create tcp connection ?&lt;/P&gt;
  &lt;P&gt;Thank you&lt;/P&gt;</description>
    <pubDate>Wed, 21 Oct 2020 14:06:21 GMT</pubDate>
    <dc:creator>sigwork</dc:creator>
    <dc:date>2020-10-21T14:06:21Z</dc:date>
    <item>
      <title>Create a tcp connection</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-a-tcp-connection/m-p/12283177#M1988898</link>
      <description>&lt;P&gt;I am using this code to create a class managing the connections to devices available with telnet.&lt;BR /&gt;I am following this &lt;/P&gt;
  &lt;P&gt;&lt;A href="https://help.sap.com/viewer/05d041d3df1a4595a3c45f57c15e2325/7.52.6/en-US/fb4c69f8c58644598b7240f2c825d064.html" target="test_blank"&gt;https://help.sap.com/viewer/05d041d3df1a4595a3c45f57c15e2325/7.52.6/en-US/fb4c69f8c58644598b7240f2c825d064.html&lt;/A&gt;&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;  
  DATA: lo_client          TYPE REF TO if_apc_wsp_client,
        lo_event_handler   TYPE REF TO ZMY_OWN_APC_HANDLER,
        port    TYPE string,
        lv_frame           TYPE apc_tcp_frame.
  
            lv_frame-frame_type = if_apc_tcp_frame_types=&amp;gt;co_frame_type_terminator. 
            lv_frame-terminator = '0A'. " 


  lo_client = cl_apc_tcp_client_manager=&amp;gt;create( i_host = me-&amp;gt;host " 10.X.X.X
      i_port = port " '20000'
      i_frame = lv_frame
      i_event_handler = lo_event_handler
  )&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;I have an error &lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;Creation of APC client object has failed with error text: Argument not found.

OTR-Based Exception of Class: CX_APC_WSP_CLIENT_ERROR&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;It seems that this error comes from cl_http_client=&amp;gt;create_by_url&lt;/P&gt;
  &lt;P&gt;I checked the code of cl_apc_tcp_client_manager I find that it create lo_apc_client of type cl_apc_wsp_client which try to create a http client ( cl_http_client=&amp;gt;create) which fail raising cx_apc_wsp_client_error with textid : cx_apc_wsp_client_error=&amp;gt;client_create_failed. I was wondering if there is a way to create a tcp connection not related to Web Socket.&lt;/P&gt;
  &lt;P&gt;Is cl_apc_tcp_client_manager the right tool to create tcp connexion ?&lt;/P&gt;
  &lt;P&gt;What would you use to create tcp connection ?&lt;/P&gt;
  &lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Wed, 21 Oct 2020 14:06:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-a-tcp-connection/m-p/12283177#M1988898</guid>
      <dc:creator>sigwork</dc:creator>
      <dc:date>2020-10-21T14:06:21Z</dc:date>
    </item>
  </channel>
</rss>

