BigSpeed Voice Chat SDK
API Documentation
Please click on a topic in the left panel.

Introduction
BigSpeed Voice Chat SDK is a set of two COM objects (Client and Server) that lets you set up a private voice chat network for secure messaging. The transfered data are scrambled using on-the-fly 128-bit AES encryption, without need of SSL certificates. The security is provided in two different modes: symmetric encryption with shared secret key and asymmetric encryption with 1024-bit public/private keys.

The server is responsible for keeping information on and authentication of online peers. All peers connected to a particular server build a single private community.

Fine grained access control is realized by a group of user-oriented permissions. They grant access control privileges to system resources and services in a flexible and secure manner.

The voice stream is highly compressed to deliver the best possible sound over a limited-bandwidth connection. In addition, the average bitrate is reduced thanks to the silence compression. In the encoder, a voice activity detector with an adjustable threshold level is used to distinguish between regions with normal speech activity and those with silence or background noise.

Significant echo suppression is achieved using a robust double talk detector. Capability to mute recording and mute playback is implemented.

The incoming and outgoing audio data are available in raw PCM format for visualization in the application.

Two special events notify about signal overloading (possible distorsions) and transmission delays (network congestions).

Two different kind of text information can be exchanged between peers: alert and chat messages.

File transfer capability is implemented for direct file exchange between peers.

BigSpeed Voice Chat SDK utilizes an elegant event-driven paradigm for easy integration into Windows applications. A special attention is paid to provide responsive user interface while avoiding multithreading problems and maintaining maximum bandwidth efficiency.

Carefully designed set of properties, methods, and events offers great flexibility to develop voice chat applications quickly and easily.

Sample applications are included in Visual Basic 2005 and Delphi 7.




Installation

The BigSpeed Voice Chat SDK setup utility will copy all the necessary files into the installation directory you selected and will register the COM libraries on your Windows system. There are some additional steps you must take to complete the installation, based on which development language you are using.


Installation instructions for Visual Basic 6.0
  • Start Visual Basic 6.0
  • Create a new project or open an existing one.
  • Select References from the Project menu.
  • Entries named "BIGSPEED Voice Chat Client Component" and "BIGSPEED Voice Chat Server Component" should appear in the components list.
  • In the References dialog, make sure the "BIGSPEED Voice Chat Client Component" and "BIGSPEED Voice Chat Server Component" items are checked in the references list.
  • Click the OK button. This will make the COM objects available for use in your applications.



Installation instructions for Delphi 7
  • Start Delphi
  • Open an existing project or create a new project
  • From the Project menu, select the "Import Type Library" item
  • Select the "BIGSPEED Voice Chat Client Component" and "BIGSPEED Voice Chat Server Component" from the list of libraries
  • Check the "Generate Component Wrapper" checkbox
  • Enter the path for the new unit in the "Unit dir name" field.
  • Click on the "Create Unit" button that's on the Import Type Library dialog



Installation instructions for Visual Basic 2005
  • Start Visual Basic .NET
  • Create a new project or open an existing one.
  • From the Project menu, select the "Add Reference" item
  • In the "Add Reference" dialog, click the tab named "COM" .
  • Entries named "BIGSPEED Voice Chat Client Component" and "BIGSPEED Voice Chat Server Component" should appear in the components list.
  • Make sure the "BIGSPEED Voice Chat Client Component" and "BIGSPEED Voice Chat Server Component" are selected in the components list.
  • Click the OK button. This will make the COM objects available for use in your applications.




LastError property


Data type

Integer    (Read-only)


Default value

None


Description

LastError property returns the error code for the last method invocation. Zero indicates no error (success).
SecurityMode property


Data type

Integer


Default value

Zero


Description

SecurityMode property specifies what security mode to be used for the next connectuon sessions.
There are three possible values:

0 - Plain mode. No encryption is used.

1 - Symmetric encryption. The SecretKey property will be used by the component to calculate a unique session key for each connection. The incomming connections will be limited only to the peers which have assigned the same SecretKey.

2 - Asymmetric encryption. The PublicKey/PrivateKey properties will be used by the component to calculate a unique session key for each connection. The incomming connections can be limited only to a predefined list of peers by assigning the correct digital fingerprints to the property Fingerprints.



SecretKey property


Data type

String


Default value

Empty


Description

SecretKey property holds the cryptographic key used to calculate the session key when a symmetric encyption is used. Only peers with the same secret key will be able to communicate to each other.


PublicKey property


Data type

String


Default value

Empty


Description

PublicKey property holds the public key used to calculate the session key in the asymmetric encryption mode. It should be previously generated by the method GenerateKeypair.


PrivateKey property


Data type

String


Default value

Empty


Description

PrivateKey property holds the private key used to calculate the session key in the asymmetric encryption mode. It should be previously generated by the method GenerateKeypair.


Fingerprints property


Data type

String


Default value

Empty


Description

Fingerprints property optionally can be used to restrict the incomming connection only to certain peers. The expected format is a comma-delimited list of digital fingerprints, as calculated by the method TakeFingerprint.


BindAddress property


Data type

String


Default value

Empty


Description

If the local machine has multiple network interfaces, this property can specify which one to be used. If the value is empty, the default IP address will be used.
SessionOpening property


Data type

Boolean (Read-only)


Default value

False


Description

This property indicates if the Client is in a connecting state. There are three possible states: closed (the default), connecting, and connected. The component stays in a connecting state after the method OpenSession is called until either of the events OnSessionOpen or OnSessionRejected is fired.
SessionOpen property


Data type

Boolean (Read-only)


Default value

False


Description

This property indicates if the Client is in a connected state. There are three possible states: closed (the default), connecting, and connected. The component stays in a connected state after the event OnSessionOpen is fired until the event OnSessionClosed is fired.
Username property


Data type

String


Default value

Empty


Description

Username property specifies the sign-in ID of the user. If it's empty, a default (Guest) user will be used from the peers when they determine the access rights for local Client.
ServerAddress property


Data type

String


Default value

Empty


Description

This property holds the IP address of the Server, when the session is open.
ServerPort property


Data type

Integer


Default value

0


Description

This property holds the port of the Server, when the session is open.
SocksVersion property


Data type

Integer


Default value

4


Description

This property specifies the version of the SOCKS protocol to be used. Valid values are "4" and "5".
SocksServer property


Data type

String


Default value

Empty


Description

SocksServer property sets the address of the proxy server. It accepts dotted decimal format or domain name.
SocksPort property


Data type

Long


Default value

0


Description

SocksPort property indicates the port of the proxy server.
SocksUsername property


Data type

String


Default value

Empty


Description

SocksUsername property specifies the user name to be used for proxy server authentication.
SocksPassword property


Data type

String


Default value

Empty


Description

SocksPassword property specifies the password to be used for proxy server authentication.
TransferSuffix property


Data type

String


Default value

"_bsfilelib_transfer"


Description

TransferSuffix property holds the string constant to be appended to the name of the transferred upload files during the operation is in progress.
MuteRecording property


Data type

Boolean   


Default value

False


Description

If set to True, the input signal from the microphone will be muted.
MutePlayback property


Data type

Boolean   


Default value

False


Description

If set to True, the output signal to the speakers will be muted.
ActivationLevel property


Data type

Integer   


Default value

2


Description

A threshold sound level, at which the voice recording will be activated. It's a relative value, from 0 to 10.
CompressionLevel property


Data type

Integer   


Default value

3


Description

Use CompressionLevel to set the compression ratio of the voice data before sending it to the peer. Higher compression results in a poorer sound quality, but a smaller size. It's a relative value, from 0 to 15.
RecordingDevice property


Data type

Integer   


Default value

0


Description

This number is the ID of the wave in device to be used for recording.
PlaybackDevice property


Data type

Integer   


Default value

0


Description

This number is the ID of the wave out device to be used for playback.
GenerateKeypair method


Declaration

GenerateKeypair( ByRef aPublicKey As String, ByRef aPrivateKey As String ) As Boolean


Description

This method generates a new random key pair of public and private keys. They can be used for the properties PublicKey and PrivateKey.


Parameters

aPublicKeyThe Base64 encoded value of the generated public key is returned here
aPublicKeyThe Base64 encoded value of the generated private key is returned here


Return

If the return value is TRUE the method invocation is successful. Otherwise the property LastError can be used to retrieve the error code.


Example

Ok = GenerateKeypair( PubKey, PvtKey )
TakeFingerprint method


Declaration

TakeFingerprint( aPublicKey As String ) As String


Description

This method calculates a digital fingerprint (MD5 checksum) of a public key.


Parameters

aPublicKeyBase64 encode value of the public key.


Return

The return value is the Base64 encoded MD5 checksum. It can be used in the property Fingerprints on the remote peers.


Example

FP = TakeFingerprint( PubKey )
GetMoniker method


Declaration

GetMoniker( ByVal aHandle As Long ) As Long


Description

GetMoniker method provides the moniker ID associated with the peer object. It should be previously set with SetMoniker method.


Parameters

aHandleHandle of the desired peer object.


Return

Integer value representing the moniker ID.
SetMoniker method


Declaration

SetMoniker( ByVal aHandle As Long ,ByVal aMoniker As Long )


Description

SetMoniker method assigns a moniker ID (4 byte integer) to a peer object. This could be helpful for easy reference to some application data associated with the client.


Parameters

aHandleHandle of the desired peer object.
aMonikerThe moniker ID value


Return

None.
OpenSession method


Declaration

OpenSession( ByVal aHost As String , ByVal aPort As Long , ByVal aUsername As String , ByVal aPassword As String ) As Boolean


Description

OpenSession method issues a request to establish a connection to the Server. The Client moves from closed to the connecting state. The application will be notified later on for the result of the operation. If the Client is connected successfully the event OnSessionOpen will be fired, otherwise the event OnSessionRejected will be fired.


Parameters

aHostThe address of the Server. It can be in dotted decimal format or domain name.
aPortThe listening port number of the Server.
aUsernameThe username for logging in to the Server. If it's empty, the default (Guest) account will be used
aPasswordThe password needed for the login operation. Should be empty for Guest login.


Return

If the return value is TRUE the method invocation is successful. Otherwise the property LastError can be used to retrieve the error code.


Example

Ok = P2pClient.OpenSession(edHost.Text, Val(edServerPort.Text), edUsername.Text, edPassword.Text)
CloseSession method


Declaration

CloseSession As Boolean


Description

CloseSession method issues a reguest to the Client to break the connection with the Server. The event OnSessionClosed will notify the application about the result of the operation.


Parameters

None


Return

If the return value is TRUE the method invocation is successful. Otherwise the property LastError can be used to retrieve the error code.
GetSessionState method


Declaration

GetSessionState() As Long


Description

GetSessionState method provides information about the current status of the connection to the server.


Parameters

None


Return

An integer code with the following meaning:
0Disconnected
1Connecting
2Connected
DisconnectPeer method


Declaration

DisconnectPeer( ByVal aHandle As Long ) As Boolean


Description

DisconnectPeer method disconnects and destroys a peer object.


Parameters

aHandleHandle of the desired peer object.


Return

If the return value is TRUE the method invocation is successful. Otherwise the property LastError can be used to retrieve the error code.
GetClientName method


Declaration

GetClientName( ByVal aHandle As Long ) As String


Description

GetClientName method provides the user name associated with a peer object.


Parameters

aHandleHandle of the desired peer object.


Return

Name of the logged in user.
GetClientAddress method


Declaration

GetClientAddress( ByVal aHandle As Long ) As String


Description

GetClientAddress gives the peer IP address.


Parameters

aHandleHandle of the desired peer object.


Return

Peer address in IP dotted format.
GetClientPort method


Declaration

GetClientPort( ByVal aHandle As Long ) As Long


Description

GetClientPort method gives the peer port number.


Parameters

aHandleHandle of the desired peer object.


Return

Peer port number.
SendAlertMessage method


Declaration

SendAlertMessage( ByVal aHandle As Long ByVal aMessage As String ) As Boolean


Description

SendAlertMessage method sends an alert message to a connected peer.


Parameters

aHandleHandle of the desired peer object.
aMessageText of the message to be sent


Return

If the return value is TRUE the method invocation is successful. Otherwise the property LastError can be used to retrieve the error code.
SendChatMessage method


Declaration

SendChatMessage( ByVal aHandle As Long ByVal aMessage As String ) As Boolean


Description

SendChatMessage method sends a chat message to a connected peer.


Parameters

aHandleHandle of the desired peer object.
aMessageText of the message to be sent


Return

If the return value is TRUE the method invocation is successful. Otherwise the property LastError can be used to retrieve the error code.
SendBinaryMessage method


Declaration

SendBinaryMessage( ByVal aHandle As Long , ByRef aMessage As Variant ) As Boolean


Description

SendBinaryMessage method sends a binary message (byte array) to a peer or the server.


Parameters

aHandleHandle of the desired peer object. If it's zero, the message is sent to the server.
aMessageVariant array of bytes holding the message data


Return

If the return value is TRUE the method invocation is successful. Otherwise the property LastError can be used to retrieve the error code.
GetCaller method


Declaration

GetCaller( ) As Long


Description

GetCaller method provides the handle of the peer object which is requested to initiate a talk.


Return

Integer value representing the handle of the peer object.
GetTalkerCount method


Declaration

GetTalkerCount( ) As Long


Description

GetTalkerCount method returns the number of peers currently involved in a talk.


Return

Number of the talking peers.
GetTalker method


Declaration

GetTalker( ByVal aIndex As Long ) As Long


Description

GetTalker method provides the handle of the peer object which is currently involved in a call.


Parameters

aIndexIndex of the peer object, must be from 0 to GetTalkerCount-1.


Return

Integer value representing the handle of the peer object.
GetTalkState method


Declaration

GetTalkState( ByVal aHandle As Long ) As Long


Description

GetTalkState method provides information about the current talk state of a peer.


Parameters

aHandleHandle of the desired peer object.


Return

An integer value with the following meaning:
0Idle
1Outgoing invitation
2Established talk
3Incoming invitation
GetRecordingDeviceCount method


Declaration

GetRecordingDeviceCount( ) As Long


Description

GetRecordingDeviceCount method returns the number of sound recording devices installed on the system.


Parameters

None


Return

Number of devices
GetRecordingDeviceName method


Declaration

GetRecordingDeviceName( ByVal aIndex As Long ) As String


Description

GetRecordingDeviceName method provides the name describing a sound recording device.


Parameters

aIndexIndex of the device in interest


Return

A device name
GetPlaybackDeviceCount method


Declaration

GetPlaybackDeviceCount( ) As Long


Description

GetPlaybackDeviceCount method returns the number of sound playing devices installed on the system.


Parameters

None


Return

Number of devices
GetPlaybackDeviceName method


Declaration

GetPlaybackDeviceName( ByVal aIndex As Long ) As String


Description

GetPlaybackDeviceName method provides the name describing a sound playing device.


Parameters

aIndexIndex of the device in interest


Return

A device name
BeginTalk method


Declaration

BeginTalk( ByVal aHandle As Long ) As Boolean


Description

BeginTalk method sends an invitation to a peer to participiate in a talk. The response will be available through the events OnTalkBegan or OnTalkRefused.


Parameters

aHandleHandle of the desired peer object.


Return

If the return value is TRUE the method invocation is successful. Otherwise the property LastError can be used to retrieve the error code.
EndTalk method


Declaration

EndTalk()


Description

EndTalk method terminates the currently established talk.


Return

None
RequestOutFile method


Declaration

RequestOutFile( ByVal aHandle As Long ByVal aFilename As String ) As Boolean


Description

RequestOutFile method issues a request to send a file to a connected peer.


Parameters

aHandleHandle of the desired peer object.
aFilenameThe full path and name of the file to be sent


Return

If the return value is TRUE the method invocation is successful. Otherwise the property LastError can be used to retrieve the error code.
CancelOutFile method


Declaration

CancelOutFile( ByVal aHandle As Long ) As Boolean


Description

CancelOutFile method cancel a running outgoing file transfer.


Parameters

aHandleHandle of the peer with the outgoing file transfer.


Return

If the return value is TRUE the method invocation is successful. Otherwise the property LastError can be used to retrieve the error code.
CancelInFile method


Declaration

CancelInFile( ByVal aHandle As Long ) As Boolean


Description

CancelInFile method cancel a running incoming file transfer.


Parameters

aHandleHandle of the peer with the incoming file transfer.


Return

If the return value is TRUE the method invocation is successful. Otherwise the property LastError can be used to retrieve the error code.
GetOutgoingFile method


Declaration

GetOutgoingFile( ByVal aHandle As Long ) As String


Description

GetOutgoingFile method provides the file path and name for the currently running outgoing file transfer.


Parameters

aHandleHandle of the desired peer object.


Return

Path and name of the transferred file.
OnSessionOpen event


Declaration

OnSessionOpen


Description

OnSessionOpen event is generated when the Client has just been connected to the Server after a call to "OpenSession()". At this moment the Client is ready to accept connections from other peers. The component moves from connecting to connected state.


Parameters

None
OnSessionClosed event


Declaration

OnSessionClosed()


Description

This event is generated when the connection to the Server has just been broken. All currently connected peers are automatically disconnected. The Client moves from connected to the closed state.


Parameters

None
OnSessionRejected event


Declaration

OnSessionRejected


Description

OnSessionRejected event is generated when a connection attempt to the Server (call to OpenSession() method) has been failed. The Client moves from connecting to the closed state. The LastError property holds the error code.


Parameters

None
OnClientConnected event


Declaration

OnClientConnected(ByVal aHandle As Long)


Description

OnClientConnected event is generated when a new peer object has just been created. It is fired when the peer information is received from the server.


Parameters

aHandle The handle of the newly created peer. It should be stored for future references.
OnClientDisconnected event


Declaration

OnClientDisconnected(ByVal aHandle As Long)


Description

OnClientDisconnected event is generated when a connected peer has just been disconnected from the Client. The handle of the peer is no more valid for future references.


Parameters

aHandleThe handle of the peer firing the event
OnAlertMessage event


Declaration

OnAlertMessage( ByVal aHandle As Long ,ByVal aMessage As String )


Description

OnAlertMessage event delivers an alert message from a peer.


Parameters

aHandleThe handle of the peer firing the event
aMessageThe text of the message
OnChatMessage event


Declaration

OnChatMessage( ByVal aHandle As Long ,ByVal aMessage As String )


Description

OnChatMessage event delivers a chat message from a peer.


Parameters

aHandleThe handle of the peer firing the event
aMessageThe text of the message
OnBinaryMessage event


Declaration

OnBinaryMessage( ByVal aHandle As Long ,ByRef aMessage As Variant)


Description

OnBinaryMessage event delivers binary message received from a peer or the server.


Parameters

aHandleThe handle of the peer firing the event. If it's zero, sender is the server
aMessageByte array holding the message data
OnTalkInvited event


Declaration

OnTalkInvited( ByVal aHandle As Long ,ByRef aOkay As Boolean )


Description

OnTalkInvited event notifies about a talk request from a peer. The application should display a prompt to the user asking for a permission.


Parameters

aHandleHandle of the peer object firing the event.
aOkayIf the user wants to accept the call, this parameter must be set to True
OnTalkBegan event


Declaration

OnTalkBegan( ByVal aHandle As Long )


Description

OnTalkBegan event notifies about a successful establishment of a talk. It is fired after a positive answer to OnTalkInvited.


Parameters

aHandleHandle of the peer object firing the event.
OnTalkRefused event


Declaration

OnTalkRefused( ByVal aHandle As Long , ByVal aCode As Long )


Description

OnTalkRefused event notifies about a failed outgoing call request with BeginTalk. It is fired after a negative response to OnTalkInvited at the remote side.


Parameters

aHandleHandle of the peer object firing the event.
aCodeThe error code
OnTalkFailed event


Declaration

OnTalkFailed( ByVal aHandle As Long , ByVal aCode As Long )


Description

OnTalkFailed event notifies about a failed incoming call. It is fired after OnTalkInvited if by some reason the talk cannot be started.


Parameters

aHandleHandle of the peer object firing the event.
aCodeThe error code
OnTalkEnded event


Declaration

OnTalkEnded( ByVal aHandle As Long )


Description

OnTalkEnded event notifies about an ended call previously signaled with OnTalkBegan.


Parameters

aHandleHandle of the peer object firing the event.
OnWaveRecorded event


Declaration

OnWaveRecorded( ByRef aWave As Variant )


Description

OnWaveRecorded event delivers the last recorded chunk of voice data.


Parameters

aWaveVariant array of bytes containing audio data in PCM format
OnWavePlayed event


Declaration

OnWavePlayed( ByVal aHandle As Long ,ByRef aData As Variant )


Description

OnWavePlayed event notifies about the last played chunk of voice data.


Parameters

aHandleHandle of the player sending the event
aDataAudio data in PCM format
OnWaveEncoded event


Declaration

OnWaveEncoded( ByRef aWave As Variant ,ByRef aCode As Variant )


Description

OnWaveEncoded event delivers the last compressed frame of voice data.


Parameters

aWaveVariant array of bytes containing raw data in PCM format
aCodeVariant array of bytes containing compressed data
OnWaveDecoded event


Declaration

OnWaveDecoded( ByVal aHandle As Long ,ByRef aCode As Variant ,ByRef aWave As Variant )


Description

OnWaveDecoded event delivers the last decompressed frame of voice data.


Parameters

aHandleHandle of the player sending the event
aCodeVariant array of bytes containing compressed data
aWaveVariant array of bytes containing raw data in PCM format
OnStartRecording event


Declaration

OnStartRecording


Description

OnStartRecording event is generated when high sound level is detected and the client is switching to recording state.


Parameters

None
OnStopRecording event


Declaration

OnStopRecording


Description

OnStopRecording event is generated when lower sound level is detected and the client is switching to paused state.


Parameters

None
OnStartDelaying event


Declaration

OnStartDelaying


Description

OnStartDelaying event is generated when a packet delay is detected because of network slowdown.


Parameters

None
OnStopDelaying event


Declaration

OnStopDelaying


Description

OnStopDelaying event is generated when the network performance is good enough to compensate the packet delay.


Parameters

None
OnStartOverloading event


Declaration

OnStartOverloading


Description

OnStartOverloading event is generated when the input signal has too high level and there is a risk for audio distorsions.


Parameters

None
OnStopOverloading event


Declaration

OnStopOverloading


Description

OnStopOverloading event is generated when the input signal is back to a normal level.


Parameters

None
OnOutFileProgress event


Declaration

OnOutFileProgress( ByVal aHandle As Long ,ByVal aCountLo As Long ,ByVal aCountHi As Long ,ByVal aSizeLo As Long ,ByVal aSizeHi As Long )


Description

OnOutFileProgress provides progress information about outgoing file transfer.


Parameters

aHandleHandle of the peer object firing the event.
aCountLoThe low 32 bits of the current byte count.
aCountHiThe high 32 bits of the current byte count.
aSizeLoThe low 32 bits of the total byte size.
aSizeHiThe high 32 bits of the total byte size.
OnOutFileDone event


Declaration

OnOutFileDone( ByVal aHandle As Long ByVal aCode As Long )


Description

OnOutFileDone event notifies about a completion of an outgoing file transfer.


Parameters

aHandleHandle of the peer object firing the event.
aHandleError code for the operation, zero on success
OnInFileRequested event


Declaration

OnInFileRequested( ByVal aHandle As Long ,ByRef aPath As String ,ByRef aOkay As Boolean )


Description

OnInFileRequested event notifies about a request for incoming file transfer from a peer. The application should ask the user for permission and accept or reject the request.


Parameters

aHandleHandle of the peer object firing the event.
aPathHere the application must return the full path for the requested file to be placed.
aOkayIf the aplication wants to accept the transfer, this parameter must be set to True
OnInFileProgress event


Declaration

OnInFileProgress( ByVal aHandle As Long ,ByVal aCountLo As Long ,ByVal aCountHi As Long ,ByVal aSizeLo As Long ,ByVal aSizeHi As Long )


Description

OnInFileProgress provides progress information about incoming file transfer.


Parameters

aHandleHandle of the peer object firing the event.
aCountLoThe low 32 bits of the current byte count.
aCountHiThe high 32 bits of the current byte count.
aSizeLoThe low 32 bits of the total byte size.
aSizeHiThe high 32 bits of the total byte size.
OnInFileDone event


Declaration

OnInFileDone( ByVal aHandle As Long ByVal aCode As Long )


Description

OnInFileDone event notifies about a completion of an incoming file transfer.


Parameters

aHandleHandle of the peer object firing the event.
aHandleError code for the operation, zero on success
LocalIPList property


Data type

String    (Read-only)


Default value

N/A


Description

Returns a comma-delimited list of available IP addresses on the local machine.

LastError property


Data type

Integer    (Read-only)


Default value

None


Description

LastError property returns the error code for the last method invocation. Zero indicates no error (success).
SecurityMode property


Data type

Integer


Default value

Zero


Description

SecurityMode property specifies what security mode to be used for the next connectuon sessions.
There are three possible values:

0 - Plain mode. No encryption is used.

1 - Symmetric encryption. The SecretKey property will be used by the component to calculate a unique session key for each connection. The incomming connections will be limited only to the peers which have assigned the same SecretKey.

2 - Asymmetric encryption. The PublicKey/PrivateKey properties will be used by the component to calculate a unique session key for each connection. The incomming connections can be limited only to a predefined list of peers by assigning the correct digital fingerprints to the property Fingerprints.



SecretKey property


Data type

String


Default value

Empty


Description

SecretKey property holds the cryptographic key used to calculate the session key when a symmetric encyption is used. Only peers with the same secret key will be able to communicate to each other.


PublicKey property


Data type

String


Default value

Empty


Description

PublicKey property holds the public key used to calculate the session key in the asymmetric encryption mode. It should be previously generated by the method GenerateKeypair.


PrivateKey property


Data type

String


Default value

Empty


Description

PrivateKey property holds the private key used to calculate the session key in the asymmetric encryption mode. It should be previously generated by the method GenerateKeypair.


Fingerprints property


Data type

String


Default value

Empty


Description

Fingerprints property optionally can be used to restrict the incomming connection only to certain peers. The expected format is a comma-delimited list of digital fingerprints, as calculated by the method TakeFingerprint.


BindAddress property


Data type

String


Default value

Empty


Description

If the local machine has multiple network interfaces, this property can specify which one to be used. If the value is empty, the default IP address will be used.
ListeningPort property


Data type

Long


Default value

0


Description

ListeningPort property holds the port number on which the Server is listening for incoming connections. If it's set to 0, the Server will use a random value. If the PC is behind a firewall/NAT/router, you need to forward/open this port. The website www.portforward.com may help in that case.
LocalIPList property


Data type

String    (Read-only)


Default value

Empty


Description

LocalIPList property holds a comma-delimited list of available IP addresses of the local machine.
Running property


Data type

Boolean (Read-only)


Default value

False


Description

Running property indicates if the Server is currently listening for incoming connections.
Start method


Declaration

Start( ) As Boolean


Description

Start method instructs the Server to start listening for incoming connections.


Parameters

None.


Return

If the return value is TRUE the method invocation is successful. Otherwise the property LastError can be used to retrieve the error code.
Stop method


Declaration

Stop( ) As Boolean


Description

Stop method instructs the Server to stop listening for incoming connections. All currently connected clients will be disconnected as well.


Parameters

None.


Return

If the return value is TRUE the method invocation is successful. Otherwise the property LastError can be used to retrieve the error code.
GetMoniker method


Declaration

GetMoniker( ByVal aHandle As Long ) As Long


Description

GetMoniker method provides the moniker ID associated with the client object. It should be previously set with SetMoniker method.


Parameters

aHandleHandle of the desired client object.


Return

Integer value representing the moniker ID.
SetMoniker method


Declaration

SetMoniker( ByVal aHandle As Long ,ByVal aMoniker As Long )


Description

SetMoniker method assigns a moniker ID (4 byte integer) to a client object. This could be helpful for easy reference to some application data associated with the client.


Parameters

aHandleHandle of the desired client object.
aMonikerThe moniker ID value


Return

None.
GenerateKeypair method


Declaration

GenerateKeypair( ByRef aPublicKey As String, ByRef aPrivateKey As String ) As Boolean


Description

This method generates a new random key pair of public and private keys. They can be used for the properties PublicKey and PrivateKey.


Parameters

aPublicKeyThe Base64 encoded value of the generated public key is returned here
aPublicKeyThe Base64 encoded value of the generated private key is returned here


Return

If the return value is TRUE the method invocation is successful. Otherwise the property LastError can be used to retrieve the error code.


Example

Ok = GenerateKeypair( PubKey, PvtKey )
TakeFingerprint method


Declaration

TakeFingerprint( aPublicKey As String ) As String


Description

This method calculates a digital fingerprint (MD5 checksum) of a public key.


Parameters

aPublicKeyBase64 encode value of the public key.


Return

The return value is the Base64 encoded MD5 checksum. It can be used in the property Fingerprints on the remote peers.


Example

FP = TakeFingerprint( PubKey )
DisconnectPeer method


Declaration

DisconnectPeer( ByVal aHandle As Long )


Description

DisconnectPeer method disconnects and destroys a client object.


Parameters

aHandleHandle of the desired client object.


Return

None.
GetClientAddress method


Declaration

GetClientAddress( ByVal aHandle As Long ) As String


Description

GetClientAddress gives the client IP address.


Parameters

aHandleHandle of the desired client object.


Return

client address in IP dotted format.
GetClientPort method


Declaration

GetClientPort( ByVal aHandle As Long ) As String


Description

GetClientPort method gives the client's port number.


Parameters

aHandleHandle of the desired client object.


Return

client's port number.
GetClientName method


Declaration

GetClientName( ByVal aHandle As Long ) As String


Description

GetClientName method provides the user name associated with a client object.


Parameters

aHandleHandle of the desired client object.


Return

Name of the signed-in user.
SendBinaryMessage method


Declaration

SendBinaryMessage( ByVal aHandle As Long , ByRef aMessage As Variant ) As Boolean


Description

SendBinaryMessage method sends a binary message (byte array) to a client.


Parameters

aHandleHandle of the desired client object.
aMessageVariant array of bytes holding the message data


Return

If the return value is TRUE the method invocation is successful. Otherwise the property LastError can be used to retrieve the error code.
OnConnectionRequest event


Declaration

OnConnectionRequest( ByVal aReserved As Long ,ByVal aUsername As String ,ByRef aPassword As String ,ByRef aAccept As Boolean )


Description

OnConnectionRequest event notifies about a login request from a client. The application should check the user profile and return the value of the password.


Parameters

aReservedReserved for future use.
aUsernameName of the desired user.
aPasswordThis is an out parameter. If the username is found in user profile, the application must pass here the password value set for the asked username previously by the administrator.
aAcceptIf the aplication wants to grant an access to the client, this value must be set to True
OnClientConnected event


Declaration

OnClientConnected( ByVal aHandle As Long )


Description

OnClientConnected event is generated when a new client has just been connected to the Server. The application should store the handle to the newly created client object for later use.


Parameters

aHandleHandle of the newly created client object. It should be saved for future reference to it.
OnClientDisconnected event


Declaration

OnClientDisconnected( ByVal aHandle As Long ,ByVal aCode As Long )


Description

OnClientDisconnected event is generated when a connected client has just been disconnected from the Server. The handle of the client is no more valid for future references.


Parameters

aHandleThe handle of the client firing the event
aCodeIndicates the error code.
OnClientRejected event


Declaration

OnClientRejected( ByVal aUsername As String ,ByVal aAddress As String ,ByVal aPort As Long ,ByVal aCode As Long )


Description

OnClientRejected event is generated when a client connection has just been refused.


Parameters

aUsernameThe username of the client.
aAddressThe IP address of the client.
aPortThe client port.
aCodeIndicates the error code.
OnBinaryMessage event


Declaration

OnBinaryMessage( ByVal aHandle As Long ,ByRef aMessage As Variant)


Description

OnBinaryMessage event delivers binary message received from a client.


Parameters

aHandleHandle of the client firing the event
aMessageByte array holding the message data

Error codes


0 No error
1 User action
2 Unknown error
3 Invalid handle
4 Invalid data
5 There is no assigned event handler
6 Illegal operation
7 Event handler error
8 Bad encryption key
10 Connection is refused
11 Connection timeout
12 Broken connection
13 Not connected
14 Too many connections
20 Cannot start server
21 Cannot connect to SOCKS server
22 Wrong username or password
23 Access is denied
24 Client is not signed-in
30 Operation is already running
31 Operation is not running
100 Cannot create folder
101 Cannot delete folder
102 Cannot delete file
103 Cannot rename folder
104 Cannot rename file
105 Cannot open file
106 Cannot create file
107 Cannot read from file
108 Cannot write to file
109 Cannot rename temporary file
110 Non-supported format
111 Error searching file
112 Wrong checksum




Description

If the error code is negative, the cause is on the remote side.





License Agreement


License for using BigSpeed Voice Chat SDK (hereinafter referred to as this Software) from BigSpeed Computing Inc.

By using the information contained in this document you agree to be and are hereby bound by the terms of this License Agreement. If you do not agree to the terms of this Agreement, do not use the information contained in this document.



Licensing

BigSpeed Computing grants Licensee the non-exclusive license to use this Software on a single computer at any given time for the sole purpose of developing any number of end user applications, providing that each application adheres to the following conditions:
(a) The application may not compete with this Software.
(b) The application may not expose the functionality of this Software through a programmable interface.

It is forbidden to use the library for the production of developer tools, components or libraries.

There are two licensing options available depending on your needs.

If you have not paid for this Software, you are hereby granted a Freeware License to use the Free Edition as described below.

If you have paid the appropriate fee for this Software, you are hereby granted a Registered license to use the Base/Plus Editions as described below.



Freeware License

You may use the Free Edition of BigSpeed Voice Chat SDK for the purpose of developing end user applications, providing that each application shall only be used for purposes that neither directly nor indirectly have any commercial implications. You may redistribute the binary code of the Free Edition with your completed application. The application MUST acknowledge this Software in a reasonable place (Help file, About box etc).

If this Software is to be used in a commercial product, or incorporated into anything that is to be sold to a third party, then a Registered License must be purchased from BigSpeed Computing.

The Free Edition distribution package may be freely distributed, provided it is not modified in any way. No person or company may charge a fee for the distribution of BigSpeed Voice Chat SDK without written permission from the copyright holder.



Registered License

You may use the Base/Plus Editions of BigSpeed Voice Chat SDK for the purpose of developing end user commercial applications. A Registered License is issued to a specific company or organization, and entitles that organization to incorporate the binary code of this Software into commercial applications under the Licensee's brand name. There is no restriction on the number of products, or product types, incorporating the library binary code.

If Licensee has purchased a "multi-developer" license, this Software may be used on more than one computer at Licensee's premises by the number of software developers associated with the multi-developer license.



Limited warranty

BigSpeed Computing Inc. cannot be held responsible under any circumstances for damages of any character (including, but not limited to, direct or indirect damages resulting from the loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use or inability to use this product.

This software is provided under license on an "AS IS" basis, without warranty of any kind, expressed or implied, including without limitation, implied warranties of merchantability and fitness for a particular purpose. BigSpeed Computing Inc. or any third party involved in the creation, production, or delivery of the program, cannot be held responsible under any circumstances, for any direct or indirect damage, including loss of profits, interruption of business activities, or other, faced by the user of this program, even in the case that BigSpeed Computing Inc. has been advised of such damages.

The user assumes responsibility for the result or performance of the program. BigSpeed Computing Inc. may, at any time, revoke this license by notifying the user of the software. The user may cancel his license to use the product by destroying or erasing all copies of the software.




Export restrictions

You acknowledge that this Software licensed hereunder is subject to the Wassenaar Arrangement regulations, and any amendments thereof. You confirm that with respect to this Software, you will not export or re-export it, directly or indirectly, to any countries that are subject to Wassenaar Arrangement export restrictions. You further acknowledge that this software may include technical data subject to export and re-export restrictions imposed by Wassenaar Arrangement.



Property

BigSpeed Voice Chat SDK, including its code, documentation, appearance, structure, and organization is an exclusive product of BigSpeed Computing Inc., who retains the property rights to the software, its copies, modifications, or merged parts.



System requirements


System requirements
  • Windows 9x, Me, NT4 or Windows 2000, XP or higher version
  • Pentium Processor recommended
  • 16 MB RAM; 32 MB RAM under NT4 or Windows 2000 platforms, 128 MB for XP
  • Any programming language supporting COM automation


(c) BigSpeed Computing Inc. 1998-. Mastering algorithms.