Description | Hierarchy | Fields | Methods | Properties |
type unavclSTUNClient = class(unavclSTUNBase)
STUN Client
function req(method: int = C_STUN_MSGTYPE_BINDING; attrs: pointer = nil; attrsLen: int = 0): int; |
|
function createAgent(): bool; override; |
|
procedure AfterConstruction(); override; |
|
procedure doOnResponse(r: unaSTUNClient_req; error: int; mappedIP: uint32; mappedPort, boundPort: uint16); virtual; |
property bind2port: string read f_bind2port write f_bind2port; |
|
property client: unaSTUNClient read getClient; |
|
property host: string read f_host write f_host; |
|
property lastResponse: unaSTUNClient_req read f_lastResponse; |
|
property onResponse: unaSTUNCLientResponseEvent read f_onResponse write f_onResponse; |
|
property useDNSSRV: boolean read f_useDNSSRV write f_useDNSSRV default true; |
function req(method: int = C_STUN_MSGTYPE_BINDING; attrs: pointer = nil; attrsLen: int = 0): int; |
|
Sends a request to remote server.
Parameters
Returnsinternal index of request ( > 0), or -1 in case of some error |
function createAgent(): bool; override; |
|
procedure AfterConstruction(); override; |
|
procedure doOnResponse(r: unaSTUNClient_req; error: int; mappedIP: uint32; mappedPort, boundPort: uint16); virtual; |
|
Called from context of internal thread when STUN response is received |
property bind2port: string read f_bind2port write f_bind2port; |
|
Bind client to this port |
property client: unaSTUNClient read getClient; |
|
property host: string read f_host write f_host; |
|
Remote STUN Server address |
property lastResponse: unaSTUNClient_req read f_lastResponse; |
|
Response received by onResponse event. Valid only in context of onResponse() event handler. |
property onResponse: unaSTUNCLientResponseEvent read f_onResponse write f_onResponse; |
|
Called from context of internal thread when STUN response is received |
property useDNSSRV: boolean read f_useDNSSRV write f_useDNSSRV default true; |
|
User DNS SRV query to locate server(s) |
(c) 2012 Lake of Soft