Using Win32 functions in Visual FoxPro Image Gallery
Windows Sockets 2 (Winsock)
..msdn
accept
bind
closesocket
gethostbyaddr
gethostbyname
gethostname
getnameinfo
getprotobyname
getprotobynumber
getservbyname
getservbyport
getsockopt
htonl
htons
inet_addr
inet_ntoa
listen
ntohl
ntohs
recv
recvfrom
send
sendto
setsockopt
socket
WSACleanup
WSACloseEvent
WSAConnect
WSACreateEvent
WSAEnumProtocols
WSAEventSelect
WSAGetLastError
WSARecv
WSASend
WSAStartup
WSAWaitForMultipleEvents
ws_connect
ws_select
Code examples:
How to build UDP responder
sendto
..msdn    Add comment     W32 Constants      Translate this page
Sends data to a specific destination.
Code examples:
How to build UDP responder
Declaration:
int sendto(
  SOCKET s,
  const char* buf,
  int len,
  int flags,
  const struct sockaddr* to,
  int tolen
);
FoxPro declaration:
DECLARE INTEGER sendto IN ws2_32;
    INTEGER s,;
    STRING @buf,;
    INTEGER buflen,;
    INTEGER wsflags,;
    STRING @sendto,;
    INTEGER tolen
Parameters:
s
[in] Descriptor identifying a (possibly connected) socket.

buf
[in] Buffer containing the data to be transmitted.

len
[in] Length of the data in buf, in bytes.

flags
[in] Indicator specifying the way in which the call is made.

to
[in] Optional pointer to a sockaddr structure that contains the address of the target socket.
tolen
[in] Size of the address in to, in bytes.
Return value:
If no error occurs, sendto returns the total number of bytes sent, which can be less than the number indicated by len. Otherwise, a value of SOCKET_ERROR is returned, and a specific error code can be retrieved by calling WSAGetLastError.
My comment:
The sendto function is normally used on a connectionless socket to send a datagram to a specific peer socket identified by the to parameter. Even if the connectionless socket has been previously connected to a specific address, the to parameter overrides the destination address for that particular datagram only.

On a connection-oriented socket, the to and tolen parameters are ignored, making sendto equivalent to send.
Word Index links for the sendto :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2006-06-12 16:22:38
Modified: 2006-06-12 16:26:57
Visited in last 7 days: 9
User Contributed Notes:
There are no notes on this subject.


Copyright 2001-2014 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

Privacy policy
Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.1.68), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (23.22.194.120)
2 sec.Function: 'CeDeleteFile'
Function group: 'Remote Application Programming (RAPI)'
4 sec.Solution: 'ContextMenu ActiveX Control'
45 sec.Example: 'Displaying printer-properties Property Sheet for the specified printer'
6.7 hrs.Function: 'GdipDrawImageRectRectI'
3 day(s)Function: 'JetCreateDatabase'
Function group: 'Extensible Storage Engine (ESE, Jet Blue)'
 Example: 'Subclassing CommandButton control to create BackColor property'
 Function: 'waveOutSetVolume'
 Function: 'MAPISendDocuments'
Function group: 'Simple MAPI'
 Function: 'NetScheduleJobDel'
Function group: 'Network Management'
 Function: 'AVIStreamLength'
Function group: 'Windows Multimedia'
Google
Advertise here!