Home Units Hierarchy Routines All identifiers

Class unaUdpSocket

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type unaUdpSocket = class(unaSocket)

Description

This class encapsulates UDP socket implementation.

Hierarchy

Overview

Methods

Public constructor create();
Public function recvfrom(out from: sockaddr_in; data: pointer; dataLen: uint; noCheck: bool = true; flags: uint = 0; timeout: tTimeout = 3000): int; overload;
Public function recvfrom(out from: sockaddr_in; var data: aString; noCheck: bool = true; flags: uint = 0; timeout: tTimeout = 3000): int; overload;
Public function sendto(var addr: sockaddr_in; data: pointer; size: uint; flags: uint = 0; timeout: tTimeout = 3000; noCheck: bool = false): uint; overload;
Public function sendto(var addr: sockaddr_in; data: pointer; size: uint; noCheck: bool = true; flags: uint = 0): uint; overload;
Public function sendto(var addr: sockaddr_in; const data: aString; flags: uint = 0; timeout: tTimeout = 3000): uint; overload;
Public function sendto(var addr: sockaddr_in; const data: aString; noCheck: bool = true; flags: uint = 0): uint; overload;

Description

Methods

Public constructor create();

Creates UDP socket.

Public function recvfrom(out from: sockaddr_in; data: pointer; dataLen: uint; noCheck: bool = true; flags: uint = 0; timeout: tTimeout = 3000): int; overload;

Receives data from remote host. Flags could be 0, MSG_PEEK or MSG_OOB.

Returns

SOCKET_ERROR if some error ocurred, or -2 if no data can be read at this time.

Public function recvfrom(out from: sockaddr_in; var data: aString; noCheck: bool = true; flags: uint = 0; timeout: tTimeout = 3000): int; overload;

Receives data from remote host. Flags could be 0, MSG_PEEK or MSG_OOB.

Returns

specific WSA error otherwise.

Public function sendto(var addr: sockaddr_in; data: pointer; size: uint; flags: uint = 0; timeout: tTimeout = 3000; noCheck: bool = false): uint; overload;

Sends block of data to remote host. Flags could be 0, MSG_DONTROUTE or MSG_OOB. If noCheck parameter is true it will not check the socket state before sending the data. This could be used to avoid unnecessary delays.

Returns

0 if data was sent successfully, or specific WSA error otherwise.

Public function sendto(var addr: sockaddr_in; data: pointer; size: uint; noCheck: bool = true; flags: uint = 0): uint; overload;

Sends block of data to remote host. Flags could be 0, MSG_DONTROUTE or MSG_OOB. If noCheck parameter is true it will not check the socket state before sending the data. This could be used to avoid unnecessary delays.

Returns

0 if data was sent successfully, or specific WSA error otherwise.

Public function sendto(var addr: sockaddr_in; const data: aString; flags: uint = 0; timeout: tTimeout = 3000): uint; overload;

Sends string to remote host. Flags could be 0, MSG_DONTROUTE or MSG_OOB.

Returns

0 if data was sent successfully, or specific WSA error otherwise.

Public function sendto(var addr: sockaddr_in; const data: aString; noCheck: bool = true; flags: uint = 0): uint; overload;

Sends string to remote host. Flags could be 0, MSG_DONTROUTE or MSG_OOB. If noCheck parameter is true it will not check the socket state before sending the data. This could be used to avoid unnecessary delays.

Returns

0 if data was sent successfully, or specific WSA error otherwise.

(c) 2012 Lake of Soft


Generated by PasDoc 0.12.1 on 2012-10-09