Prosoft-technology MVI69-ADMNET Manuel d'utilisateur Page 71

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 122
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 70
MVI-ADMNET 'C' Programmable Application Development Function Library - ADMNET API
'C' Programmable Application Development Module with Ethernet Developer's Guide
ProSoft Technology, Inc. Page 71 of 122
February 20, 2013
ADM_send_sk
Syntax
int ADM_send_sk(char *skName, char *holdSendPtr, int *sendLen);
Parameters
skName
Name of the socket that has been initialized and used
to send data.
holdSendPtr
Pointer to a string of data that will be sent to the
ServerIPAddress
sendLen
Number of data specified to send.
Description
ADM_ send _sk sends with a socket previously open using ADM_open_sk.
Return Value
SK_SUCCESS
API has successfully open socket.
SK_PROCESS_SOCKET
Open process is still in
SK_NOT_FOUND
API could not find an initialized socket with the name
passed to the function.
Example
char sockName1[ ] = "SendSocket";
char holdingReg[100];
int buffSize1 = 4096;
int port_1 = 6565;
int numSocket1 = 1;
int result;
sock_init(); //initialize the socket interface
ADM_init_socket(numSocket1, port_1, buffSize1, sockName1);
sprintf(holdingReg,"abcdefghijklmnopqrstuvwxyz-");
sendLen = 27;
while ((result = ADM_send_sk(sockName1, holdingReg, &sendLen)) ==
SK_PROCESS_SOCKET);
if(result == SK_SUCCESS)
{
printf("Data: %s Sent \n", holdingReg);
} else {
printf("Error sending data\n");
}
See Also
ADM_receive_sk (page 73)
Vue de la page 70
1 2 ... 66 67 68 69 70 71 72 73 74 75 76 ... 121 122

Commentaires sur ces manuels

Pas de commentaire