Home Units Hierarchy Routines All identifiers

Class unavclSTUNClient

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type unavclSTUNClient = class(unavclSTUNBase)

Description

STUN Client

Hierarchy

Overview

Methods

Public function req(method: int = C_STUN_MSGTYPE_BINDING; attrs: pointer = nil; attrsLen: int = 0): int;
Protected function createAgent(): bool; override;
Public procedure AfterConstruction(); override;
Protected procedure doOnResponse(r: unaSTUNClient_req; error: int; mappedIP: uint32; mappedPort, boundPort: uint16); virtual;

Properties

Published property bind2port: string read f_bind2port write f_bind2port;
Public property client: unaSTUNClient read getClient;
Published property host: string read f_host write f_host;
Published property lastResponse: unaSTUNClient_req read f_lastResponse;
Published property onResponse: unaSTUNCLientResponseEvent read f_onResponse write f_onResponse;
Published property useDNSSRV: boolean read f_useDNSSRV write f_useDNSSRV default true;

Description

Methods

Public function req(method: int = C_STUN_MSGTYPE_BINDING; attrs: pointer = nil; attrsLen: int = 0): int;

Sends a request to remote server.

Parameters
method
method to use, default is C_STUN_MSGTYPE_BINDING
attrs
pointer to additional attributes to send
attrsLen
size of additional attributes
Returns

internal index of request ( > 0), or -1 in case of some error

Protected function createAgent(): bool; override;
 
Public procedure AfterConstruction(); override;
 
Protected procedure doOnResponse(r: unaSTUNClient_req; error: int; mappedIP: uint32; mappedPort, boundPort: uint16); virtual;

Called from context of internal thread when STUN response is received

Properties

Published property bind2port: string read f_bind2port write f_bind2port;

Bind client to this port

Public property client: unaSTUNClient read getClient;
 
Published property host: string read f_host write f_host;

Remote STUN Server address

Published property lastResponse: unaSTUNClient_req read f_lastResponse;

Response received by onResponse event. Valid only in context of onResponse() event handler.

Published property onResponse: unaSTUNCLientResponseEvent read f_onResponse write f_onResponse;

Called from context of internal thread when STUN response is received

Published property useDNSSRV: boolean read f_useDNSSRV write f_useDNSSRV default true;

User DNS SRV query to locate server(s)

(c) 2012 Lake of Soft


Generated by PasDoc 0.12.1 on 2012-10-09