Prosoft-technology MVI69-ADMNET Manual do Utilizador Página 85

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 122
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 84
MVI-ADMNET 'C' Programmable WATTCP API Functions
'C' Programmable Application Development Module with Ethernet Developer's Guide
ProSoft Technology, Inc. Page 85 of 122
February 20, 2013
udp_open_fast
Syntax
int udp_open_fast( tcp_Socket *sk, word lPort, longword ina, word port,
dataHandler_t datahandler );
Parameters
sk
Pointer to the socket that has been initialized.
lPort
Local port number.
ina
Host IP Address.
port
Host port number.
datahandler
Data Handler. Not used in this version. Use NULL for this parameter.
Description
This function opens a UDP socket connection to a host machine using
parameters passed to it. For this function, there is no wait to resolve the IP
address that passes the function. IPort is an option parameter. Most of the time,
IPort can be set to 0. The API will find an available port number for the socket.
ina is a host IP address passed as a longword. Function resolve can be used to
convert an IP address into a longword-formatted variable.
Return Value
Connection cannot be made
>0
Connection is made
Example
udp_Socket *socket;
. . .
if(udp_open_fast(socket, 0, resolve("192.168.0.1"), 5656, NULL))
{
printf("Open Successfully\n");
}
See Also
resolve (page 86)
Vista de página 84
1 2 ... 80 81 82 83 84 85 86 87 88 89 90 ... 121 122

Comentários a estes Manuais

Sem comentários