Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Network address string #3

Open
connor21 opened this issue Nov 11, 2015 · 0 comments
Open

Network address string #3

connor21 opened this issue Nov 11, 2015 · 0 comments
Milestone

Comments

@connor21
Copy link
Contributor

Replace the current host and port string with a single network address string.

<host>:<port>
[<IPv6Addr>]:<port>

<host> - hostname or IP address. If an IPv6 address is used the notation [<IPv6 address>]:<port> is requrired.
<port> - portnumber

examples

127.0.0.1:4711
localhost:80
[2001:db8::1]:80

Here is list of function required to be changes accordingly.

TML_ON_EVT_ERROR_CB_FUNC
TML_ON_PEER_REGISTRATION_CB_FUNC

tml_Send_SyncMessage
tml_Send_AsyncMessage

tml_Evt_Subscribe_MessageDestination
tml_Evt_Unsubscribe_MessageDestination

tml_Evt_Send_SubscriptionRequest
tml_Evt_Send_UnsubscriptionRequest

tml_Bal_Subscribe_MessageDestination
tml_Bal_Unsubscribe_MessageDestination

tml_Bal_Send_SubscriptionRequest
tml_Bal_Send_UnsubscriptionRequest

tml_RecStream_Open
tml_SndStream_Open

extended listener bindings

Instead of allowing only one listener to be active, multiple listeners are possible in a single TML core.

TML_LISTENER_HANDLE

new object to refer to listener

tml_Core_Listener_Create

Create a new listener.

A network address port number 0 results into a random calculated free port number during tml_Listener_Set_Enabled() execution.

coreHandle - TML core handle
sNetAddress - network address for listener binding
tml_Listener_Set_Enabled() execution.listenerHandle - reference to a new TML listener handle

tml_Core_Listener_Create(TML_CORE_HANDLE coreHandle, const TML_CTSTR *sNetAddress, TML_LISTENER_HANDLE* listenerHandle)

tml_Listener_Close

Close a listener and release resources.

listenerHandle - reference to TML listener handle

TML_INT32 tml_Listener_Close(TML_LISTENER_HANDLE* listenerHandle)

tml_Listener_Get_Address

Returns the listener's network binding address.

listenerHandle - TML listener handle
sAddress - borrowed reference to network binding address

TML_INT32 tml_Listener_Get_Address(TML_LISTENER_HANDLE listenerHandle, TML_CTSTR** sAddress)

tml_Core_Get_ListenerCount

Get the number of listeners.

coreHandle - tml core handle
iCount - reference to the number of listeners

tml_Core_Get_ListenerCount(TML_CORE_HANDLE coreHandle, TML_UINT32* iCount)

tml_Core_Get_Listener

Get listener's handle from a TML core.

coreHandle - TML core handle
index - index of listener
listenerHandle - reference to TML listener handle

TML_INT32 tml_Core_Get_Listener(TML_CORE_HANDLE coreHandle, TML_INT32 index, TML_LISTENER_HANDLE* listenerHandle)

tml_Listener_Set_Enabled

Enable/disable a listeners.

To enable / disable all listeners, use tml_Core_Set_ListenerEnabled().

listenerHandle - TML listener handle
bEnable - TML_TRUE to enable, TML_FALSE to disable the listener

tml_Listener_Set_Enabled(TML_LISTENER_HANDLE listenerHandle, TML_BOOL bEnable)

tml_Listener_Get_Enabled

Get enable status of a listener.

listenerHandle - TML listener handle
bEnable - reference to listener enable status

tml_Listener_Get_Enabled(TML_LISTENER_HANDLE listenerHandle, TML_BOOL* bEnable)
@connor21 connor21 added this to the Version 1.2 milestone Nov 11, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant