Quantcast
Channel: Forum - Recent Threads
Viewing all articles
Browse latest Browse all 5781

RE: TCP-Client additional to LAN Console

$
0
0

Hello Ralph,

Telnet is a Framework fully implemented in the configurator, which means everything is configured and opened inside the generated code and before your thread_entry function is called for the first time. In order to adapt TCP client to run on a system that has already been initialized with telnet framework, you will need to reuse IP and packet pool instances created by it. I'm attaching an older example I created for SSP 1.0.0, but you should be able to take TCP client/server code and make it work with little modifications: (Please visit the site to view this file).

The key point here is that all code before nx_ip_status_check must be removed, as this part is already called internally by the Telnet framework. You will need to cast a pointer from g_sf_comms.p_ctrl->p_extend into sf_el_nx_comms_on_comms_ctrl_t so that you can access ip and pool members, i.e.:

sf_el_nx_comms_on_comms_ctrl_t * p_extend_ctrl = (sf_el_nx_comms_on_comms_ctrl_t *) g_sf_comms.p_ctrl->p_extend;

And then you can use p_extend_ctrl->ip and p_extend_ctrl->pool instead of the IP and packet pool instances you would normally created for the TCP client.

Regards


Viewing all articles
Browse latest Browse all 5781

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>