Prosoft-technology MVI69-ADMNET Instrukcja Użytkownika Strona 80

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 122
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 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)
Przeglądanie stron 79
1 2 ... 75 76 77 78 79 80 81 82 83 84 85 ... 121 122

Komentarze do niniejszej Instrukcji

Brak uwag