Prosoft-technology MVI69-ADMNET Manual de usuario Pagina 80

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 122
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 79
WATTCP API Functions MVI-ADMNET 'C' Programmable
Developer's Guide 'C' Programmable Application Development Module with Ethernet
Page 80 of 122 ProSoft Technology, Inc.
February 20, 2013
6.2 ADMNET API Initialize Functions
The following topics detail the ADMNET API Initialize functions.
sock_init
Syntax
void sock_init(void);
Parameters
None
Description
This function will read a stored TCP/IP configuration file and prepare a variable.
Return Value
SK_SUCCESS
API has successfully initialized variables.
SK_PORT_NOT_ALLOW
API does not allow port number used.
SK_CANNOT_ALLOCATE_MEMORY
API cannot allocate memory.
Example
int numSK = 5;
int portNum = 5757;
int buffSize = 1000;
sock_init(); //initialize the socket interface
/* initialize each socket */
if(ADM_init_socket(numSK, portNum, buffSize, "ReceiveSK") != SK_SUCCESS)
{
printf("\nFailed to open ADM API... exiting program\n");
ADM_release_sockets();
}
See Also
sock_exit (page 96)
Vista de pagina 79
1 2 ... 75 76 77 78 79 80 81 82 83 84 85 ... 121 122

Comentarios a estos manuales

Sin comentarios