Objective Systems, Inc.  

ooports.h File Reference

This file contains functions to manage ports used by the stack. More...

#include "ootypes.h"

Go to the source code of this file.

Enumerations

enum  OOH323PortType {
  OOTCP,
  OOUDP,
  OORTP
}

Functions

EXTERN int ooGetNextPort (OOH323PortType type)
 Get the next port of type TCP/UDP/RTP from the corresponding range.
EXTERN int ooBindPort (OOH323PortType type, OOSOCKET socket, char *ip)
 Bind socket to a port within the port range specified by the application at the startup.


Detailed Description

This file contains functions to manage ports used by the stack.

Definition in file ooports.h.


Function Documentation

EXTERN int ooGetNextPort ( OOH323PortType  type  ) 

Get the next port of type TCP/UDP/RTP from the corresponding range.

When max value for the range is reached, it starts again from the first port number of the range.

Parameters:
type Type of the port to be retrieved(OOTCP/OOUDP/OORTP).
Returns:
The next port number for the specified type is returned.

EXTERN int ooBindPort ( OOH323PortType  type,
OOSOCKET  socket,
char *  ip 
)

Bind socket to a port within the port range specified by the application at the startup.

Parameters:
type Type of the port required for the socket.
socket The socket to be bound.
ip Dotted Ip address to bind to.
Returns:
In case of success returns the port number to which socket is bound and in case of failure just returns a negative value.


This file was last modified on 28 May 2010.
Objective Open H.323 Stack, 0.9.1