Description | Hierarchy | Fields | Methods | Properties |
type TunaConfRTPserver = class(unavclInOutPipe)
RTP Conference server
constructor Create(AOwner: TComponent); override; |
|
destructor Destroy(); override; |
|
function roomAdd(const roomName: string; roomID: tRoomID = -1; ro: bool = true): unaConfRTProom; |
|
function roomByIDAcquire(roomID: tRoomID; ro: bool = true; timeout: tTimeout = 100): unaConfRTProom; |
|
function roomByIndexAcquire(index: int; ro: bool = true; timeout: tTimeout = 100): unaConfRTProom; |
|
function roomByUserIDAcquire(userID: u_int32; ro: bool = true; timeout: tTimeout = 100): unaConfRTProom; |
|
function roomDrop(roomID: tRoomID): HRESULT; |
|
function roomGetName(roomID: tRoomID): wString; |
|
function roomGetNumUsers(roomID: tRoomID): int; |
|
function roomShutdown(roomID: tRoomID): HRESULT; overload; |
|
function roomStartup(roomID: tRoomID): HRESULT; |
|
function userAddAcquire(userID: u_int32; ro: bool = true): unaConfRTProomUser; |
|
function userByIDAcquire(userID: u_int32; ro: bool = true; timeout: tTimeout = 100): unaConfRTProomUser; |
|
function userByIndexAcquire(index: int; ro: bool = true; timeout: tTimeout = 100): unaConfRTProomUser; |
|
function userDrop(userID: u_int32): HRESULT; overload; |
|
function userDrop(user: unaConfRTProomUser): HRESULT; overload; |
|
function userGetName(userID: u_int32; out cname: wString): bool; |
|
function doOpen(): bool; override; |
|
function doRead(data: pointer; len: uint): uint; override; |
|
function doUserVerify(userID: u_int32; roomID: tRoomID; const IP, port: string): HRESULT; virtual; |
|
function doWrite(data: pointer; len: uint; provider: pointer = nil): uint; override; |
|
function getAvailableDataLen(index: integer): uint; override; |
|
function isActive(): bool; override; |
|
function roomResolveName(const roomName: wString): int; virtual; |
|
function roomShutdown(room: unaConfRTProom; markClosed: bool = true): HRESULT; overload; |
|
procedure doClose(); override; |
|
procedure doConn(userID: u_int32; roomID: tRoomID; const IP, port: string; isConnected: bool); virtual; |
|
procedure doRoomAddRemove(roomID: tRoomID; doAdd: bool); virtual; |
|
procedure idle(); virtual; |
|
procedure sendSrvCmd(addr: PSockAddrIn; const cmd: aString; idata: int32; dataBuf: pointer = nil; dataBufSize: unsigned = 0); |
|
procedure transPacket(userID: u_int32; data: pointer; len: uint; const addr: sockaddr_in; isRTCP: bool); |
property autoCreateRooms: boolean read f_acr write f_acr default true; |
|
property autoRemoveRooms: boolean read f_arr write f_arr default true; |
|
property bind2ip: string read f_bind2ip write f_bind2ip; |
|
property errorCode: int read getErrorCode; |
|
property lostTrans: int64 read f_lostTrans; |
|
property masterKey: string write setMasterKey; |
|
property onRoomAddRemove: evonRoomAddRemove read f_onRoomAddRemove write f_onRoomAddRemove; |
|
property onUserConnect: evonUserConnect read f_onUC write f_onUC; |
|
property onUserVerify: evonUserVerify read f_onUserVerify write f_onUserVerify; |
|
property port: string read f_port write f_port; |
|
property roomCount: int read getRoomCount2; |
|
property rtcp: unaRTCPstack read getRTCP; |
|
property serverName: string read f_srvName write f_srvName; |
|
property SSRC: u_int32 read getSSRC; |
|
property userAllow[ID:u_int32;isIn:bool]: bool read getUserAllow write setUserAllow; |
|
property userCount: int read getUserCount2; |
|
property userStrictlyInOneRoom: boolean read f_userSInOneRoom write f_userSInOneRoom default true; |
constructor Create(AOwner: TComponent); override; |
|
Creates server component. |
destructor Destroy(); override; |
|
Destroys server component. |
function roomAdd(const roomName: string; roomID: tRoomID = -1; ro: bool = true): unaConfRTProom; |
|
Adds new room. |
function roomByIDAcquire(roomID: tRoomID; ro: bool = true; timeout: tTimeout = 100): unaConfRTProom; |
|
function roomByIndexAcquire(index: int; ro: bool = true; timeout: tTimeout = 100): unaConfRTProom; |
|
Locks room by index. |
function roomByUserIDAcquire(userID: u_int32; ro: bool = true; timeout: tTimeout = 100): unaConfRTProom; |
|
function roomDrop(roomID: tRoomID): HRESULT; |
|
Removes a room. All users from this room will be disconnected from server. |
function roomGetName(roomID: tRoomID): wString; |
|
Returns room name.
Parameters
Returnsroom name |
function roomGetNumUsers(roomID: tRoomID): int; |
|
function roomShutdown(roomID: tRoomID): HRESULT; overload; |
|
Closes a room. All users from this room will be disconnected from server. |
function roomStartup(roomID: tRoomID): HRESULT; |
|
Re-opens a room. |
function userAddAcquire(userID: u_int32; ro: bool = true): unaConfRTProomUser; |
|
Adds a new user and acquires a lock on user object. If object is acquired, make sure to call .releaseRO()/releaseWO() when done with it. ReturnsUser object or nil if it cannot be acquired now. |
function userByIDAcquire(userID: u_int32; ro: bool = true; timeout: tTimeout = 100): unaConfRTProomUser; |
|
Acquires a lock on user object. If object is acquired, make sure to call .releaseRO()/releaseWO() when done with it. ReturnsUser object or nil if it cannot be acquired now. |
function userByIndexAcquire(index: int; ro: bool = true; timeout: tTimeout = 100): unaConfRTProomUser; |
|
Acquires a lock on user object. If object is acquired, make sure to call .releaseRO()/releaseWO() when done with it. ReturnsUser object or nil if it cannot be acquired now. |
function userDrop(userID: u_int32): HRESULT; overload; |
|
Removes user from server, user is disconnected. |
function userDrop(user: unaConfRTProomUser): HRESULT; overload; |
|
Removes user from server, user is disconnected. |
function userGetName(userID: u_int32; out cname: wString): bool; |
|
Returns user name. |
function doOpen(): bool; override; |
|
Stratups the server. |
function doRead(data: pointer; len: uint): uint; override; |
|
Does nothing. Returns0 |
function doUserVerify(userID: u_int32; roomID: tRoomID; const IP, port: string): HRESULT; virtual; |
|
Virifies if user is granted to join the room. |
function doWrite(data: pointer; len: uint; provider: pointer = nil): uint; override; |
|
Does nothing. Returns0 |
function getAvailableDataLen(index: integer): uint; override; |
|
Does nothing. Returns0 |
function isActive(): bool; override; |
|
ReturnsTrue if server is active (listening on ports) |
function roomResolveName(const roomName: wString): int; virtual; |
|
Internal. Returns index. |
function roomShutdown(room: unaConfRTProom; markClosed: bool = true): HRESULT; overload; |
|
Closes the room and disconnects all users joined to it. |
procedure doClose(); override; |
|
Closes the server. |
procedure doConn(userID: u_int32; roomID: tRoomID; const IP, port: string; isConnected: bool); virtual; |
|
Fired when new user is connected or old user is disconnected. |
procedure doRoomAddRemove(roomID: tRoomID; doAdd: bool); virtual; |
|
Fired when new room is created or old room is removed. |
procedure idle(); virtual; |
|
Fired from context of idle thread. |
procedure sendSrvCmd(addr: PSockAddrIn; const cmd: aString; idata: int32; dataBuf: pointer = nil; dataBufSize: unsigned = 0); |
|
Sends a command to client.
Parameters
|
procedure transPacket(userID: u_int32; data: pointer; len: uint; const addr: sockaddr_in; isRTCP: bool); |
|
Sends a packet to all users in a room.
Parameters
|
property autoCreateRooms: boolean read f_acr write f_acr default true; |
|
Automatically create rooms of users' request. |
property autoRemoveRooms: boolean read f_arr write f_arr default true; |
|
When set to true, causes server to remove rooms being abandoned for some time. |
property bind2ip: string read f_bind2ip write f_bind2ip; |
|
Bind to this IP. Use 0.0.0.0 to bind to all interfaces. |
property errorCode: int read getErrorCode; |
|
Last error code. |
property lostTrans: int64 read f_lostTrans; |
|
Number of audio/RTCP transmits being lost due to timeouts or other reasons |
property masterKey: string write setMasterKey; |
|
Server's master key. Not stored. |
property onRoomAddRemove: evonRoomAddRemove read f_onRoomAddRemove write f_onRoomAddRemove; |
|
Fired when new room is added or old room is removed |
property onUserConnect: evonUserConnect read f_onUC write f_onUC; |
|
Fired when new used is connected. |
property onUserVerify: evonUserVerify read f_onUserVerify write f_onUserVerify; |
|
Fired when new user is about to join the server |
property port: string read f_port write f_port; |
|
Listen on this UDP port. Port + 1 will be used for RTCP. |
property roomCount: int read getRoomCount2; |
|
Number of rooms. |
property rtcp: unaRTCPstack read getRTCP; |
|
Internal RTCP stack. |
property serverName: string read f_srvName write f_srvName; |
|
Name of server. |
property SSRC: u_int32 read getSSRC; |
|
Servers' SSRC |
property userAllow[ID:u_int32;isIn:bool]: bool read getUserAllow write setUserAllow; |
|
Controls users I/O. |
property userCount: int read getUserCount2; |
|
Number of users (in all rooms). |
property userStrictlyInOneRoom: boolean read f_userSInOneRoom write f_userSInOneRoom default true; |
|
When true one user can join one room at a time only. When false one user can participate in many rooms. |
(c) 2012 Lake of Soft