NetProg

 


   

NETPROG  PRESENTATION

 

  OverView
  Functionalities
  Programming
API
C Examples
  Download
MXEnd C NetProg Library 


#include "mx.h"
void MXEnd (MX* pmx)


Parameters Description
pmx  the MX Manager


Description : 

This function terminates the MX session of an application. Usually it is called at the end of the program before exiting. It frees all resources, closes all the connections. 

Return Values : no return value


See Also : MXInit


Example :

int main ()
{
  MX mx;

  MXInit (&mx, MXSERVER, NULL, NULL, 0, NULL);
  MXAddPort (&mx, 7080, IPPROTO_TCP);
  MXAddGeneralConnectCallBack (&mx, MXONCONNECT, TCPOnConnect, NULL);
  MXAddGeneralConnectCallBack (&mx, MXONCLOSE, TCPOnClose, NULL);

  MXDispatchEvents (&mx, 0);

  MXEnd (&mx);
}