
Application Development Function Library - ADMNET API MVI-ADMNET ♦ 'C' Programmable
Developer's Guide 'C' Programmable Application Development Module with Ethernet
Page 70 of 122 ProSoft Technology, Inc.
February 20, 2013
5.4 ADMNET API Send Socket Functions
This section describes the ADMNET API Send Socket functions.
ADM_send_socket
Syntax
int ADM_send_socket(char *skName, char *holdSendPtr, int *sendLen, char
*ServerIPAddress, int protocol);
Parameters
Name of the socket that has been initialized and used to
send data.
Pointer to a string of data that will be sent to the
ServerIPAddress
Number of data specified to send.
IP address that will be used to send data to.
Specified protocol to send over Ethernet (USE_TCP or
USE_UDP).
Description
To simplify a program, this function opens connection and sends message.
skName must be a valid name that has been initialized with ADM_init_socket.
Return Value
Socket is successfully sent.
Socket could not be found.
Socket is in the process of sending.
Example
int sendLen = 10;
int se;
se = ADM_send_socket("sendSK", "1234567890", &sendLen, "192.168.0.148",
USE_UDP);
if(se == SK_SUCCESS)
{
printf("send Success\n");
}
See Also
ADM_receive_socket (page 72)
Commenti su questo manuale