Type a page name and press Enter. You'll jump to the page if it exists, or you can create it if it doesn't.
To create a page in a module other than ws2_32, prefix the name with the module name and a period.
send (ws2_32)
.
C# Signature:
[DllImport("ws2_32.dll")]
public static extern int SendTo (IntPtr Socket, IntPtr buff, int len, SendDataFlags flags, ref SockAddr To, int tomlen);
VB Signature:
User-Defined Types:
[Flags]
public enum SendDataFlags
{
/// <summary></summary>
None = 0,
/// <summary> Specifies that the data should not be subject to routing. A Windows Sockets service provider can choose to ignore this flag</summary>
DontRoute = 1,
/// <summary>Sends OOB data (stream-style socket such as SOCK_STREAM only)</summary>
OOB = 2
}
/// <summary>Структура адреса для сокета</summary>
[StructLayout(LayoutKind.Sequential)]
public struct SockAddr
{
/// <summary>Семейство протоколов</summary>
public short Family;
/// <summary>Номер порта для сокета</summary>
public ushort Port;
/// <summary>Локальный IP адрес сокета</summary>
public AddressIP4 IPAddress;
/// <summary>8 байт для выравнивания структуры</summary>
private Int64 Zero;
/// <summary>IP адресс</summary>
[StructLayout(LayoutKind.Sequential)]
public struct AddressIP4
{
/// <summary>Первый байт IP адреса</summary>
public byte a1;
/// <summary>Второй байт IP адреса</summary>
public byte a2;
/// <summary>Третий байт IP адреса</summary>
public byte a3;
/// <summary>Четвертый байт IP адреса</summary>
public byte a4;
/// <summary>Широковещательный IP адрес</summary>
public static AddressIP4 Broadcast { get { return new AddressIP4 (255,255,255,255); } }
/// <summary>Любой IP адрес</summary>
public static AddressIP4 AnyAddress { get { return new AddressIP4 (0,0,0,0); } }
/// <summary>IP адрес локального хоста</summary>
public static AddressIP4 Loopback { get { return new AddressIP4 (127,0,0,1); } }
System.Net.Sockets.Socket (class) Socket.SendTo () - better to use It))
Notes:
Return Value
English:
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.
Russian:
Если возвращенное значение меньше чем len, то функция завершилась ошибкой, код которой вы можете узнав вызвав
helpful tips or sample code to share for using this API in managed code?
corrections to the existing content?
variations of the signature you want to share?
additional languages you want to include?
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).