diff --git a/docs/Files.md b/docs/Files.md index f7e199f..43cd959 100644 --- a/docs/Files.md +++ b/docs/Files.md @@ -9,7 +9,7 @@ as the main event loop. It is inherently single threaded using Asynchronous I/O - **[ILibAsyncSocket](files/ILibAsyncSocket.md)** Provides the underyling TCP socket functionality -- **ILibAsyncUDPSocket** +- **[ILibAsyncSocket](files/ILibAsyncUDPSocket.md)** Provides the underlying UDP socket functionality - **ILibAsyncServerSocket** Provides the underlying TCP Server functionality diff --git a/docs/files/ILibAsyncServerSocket.md b/docs/files/ILibAsyncServerSocket.md new file mode 100644 index 0000000..4bdc877 --- /dev/null +++ b/docs/files/ILibAsyncServerSocket.md @@ -0,0 +1,65 @@ +## ILibAsyncServerSocket.c + +### Abstract +ILibAsyncUDPSocket provides the underyling TCP Server implementation for the Mesh Agent. + +### Functions + +void ILibAsyncServerSocket_SetReAllocateNotificationCallback(ILibAsyncServerSocket_ServerModule AsyncServerSocketToken, ILibAsyncServerSocket_ConnectionToken ConnectionToken, ILibAsyncServerSocket_BufferReAllocated Callback); + +**ILibCreateAsyncServerSocketModule(Chain, MaxConnections, PortNumber, initialBufferSize, loopbackFlag, OnConnect, OnDisconnect, OnReceive, OnInterrupt, OnSendOK)** +**ILibCreateAsyncServerSocketModuleWithMemory(Chain, MaxConnections, PortNumber, initialBufferSize, loopbackFlag, OnConnect, OnDisconnect, OnReceive, OnInterrupt, OnSendOK, ServerUserMappedMemorySize, SessionUserMappedMemorySize)** +**ILibCreateAsyncServerSocketModuleWithMemoryEx(Chain, MaxConnections, initialBufferSize, local, OnConnect, OnDisconnect, OnReceive, OnInterrupt, OnSendOK, ServerUserMappedMemorySize, SessionUserMappedMemorySize)** +**ILibCreateAsyncServerSocketModuleWithMemoryExMOD(Chain, MaxConnections, initialBufferSize, local, OnConnect, OnDisconnect, OnReceive, OnInterrupt, OnSendOK, mod, ServerUserMappedMemorySize, SessionUserMappedMemorySize)** +Instantiates a new ILibAsyncServerSocket, adding it to the specified chain, capping the maximum number of simultaneous connections to the value specified. ServerAutoFreeMemorySize Size of AutoFreeMemory on Server to co-allocate. SessionAutoFreeMemorySize Size of AutoFreeMemory on Session to co-allocate + +**ILibAsyncServerSocket_GetConnections(server, connections, connectionsSize)** +Fetches a list of all the connected sockets + +**ILibAsyncServerSocket_GetUser(ILibAsyncServerSocket_ConnectionToken *token)** +Fetches the user object associated with a connection object + +**ILibAsyncServerSocket_GetTag(ILibAsyncSocketModule)** +**ILibAsyncServerSocket_GetTag2(ILibAsyncSocketModule)** +Fetches the Tag associated with a connection object. + +**ILibAsyncServerSocket_SetTag(ILibAsyncSocketModule, *user)** +**ILibAsyncServerSocket_SetTag2(ILibAsyncSocketModule, user)** +Associates a Tag value with a connection object + +**ILibAsyncServerSocket_SSL_SetSink(AsyncServerSocketModule, SSLHandler)** +Associates a handler with a connection object, that will be called when an SSL object has been set + +**ILibAsyncServerSocket_GetSSL(connectiontoken)** +Fetches the associated OpenSSL object from the connection object + +**ILibAsyncServerSocket_GetSSL_CTX(ILibAsyncSocketModule)** +Fetches the associated OpenSSL Context Object from the connection object + +**ILibAsyncServerSocket_SetSSL_CTX(ILibAsyncSocketModule, ssl_ctx, enableTLSDetect)** +Sets an OpenSSL Context Object to the connection object + +**ILibAsyncServerSocket_StopListening(module)** +**ILibAsyncServerSocket_ResumeListening(module)** +Pause/Resume Socket I/O on the server object + +**ILibAsyncServerSocket_GetPortNumber(ServerSocketModule)** +Fetches the port number that the TCP server is listening on + +**ILibAsyncServerSocket_GetLocal(ServerSocketModule, addr, addrLen)** +Fetches the local IPEndPoint that the TCP server is bound. + +**ILibAsyncServerSocket_Send(ServerSocketModule, ConnectionToken, buffer, bufferLength, UserFreeBuffer)** +Sends data onto the TCP stream + +**ILibAsyncServerSocket_Disconnect(ServerSocketModule, ConnectionToken)** +Disconnects a TCP stream + +**ILibAsyncServerSocket_GetPendingBytesToSend(ServerSocketModule, ConnectionToken)** +Fetches the outstanding number of bytes to be sent + +**ILibAsyncServerSocket_GetTotalBytesSent(ServerSocketModule, ConnectionToken)** +Fetches the total number of bytes that have been sent on a TCP stream, since the last reset + +**ILibAsyncServerSocket_ResetTotalBytesSent(ServerSocketModule, ConnectionToken)** +Resets the total bytes sent counter \ No newline at end of file diff --git a/docs/files/ILibAsyncUDPSocket.md b/docs/files/ILibAsyncUDPSocket.md new file mode 100644 index 0000000..3b26426 --- /dev/null +++ b/docs/files/ILibAsyncUDPSocket.md @@ -0,0 +1,55 @@ +## ILibAsyncUDPSocket.c + +### Abstract +ILibAsyncUDPSocket provides the underyling UDP socket implementation for the Mesh Agent. + +### Functions + +**ILibAsyncUDPSocket_JoinMulticastGroupV4(module, multicastAddr, localAddr)** +Joins an IPv4 Multicast group, using the specified interface + +**ILibAsyncUDPSocket_JoinMulticastGroupV6(module, multicastAddr, ifIndex)** +Joins an IPv6 Multicast group, using the specified interface index + +**ILibAsyncUDPSocket_DropMulticastGroupV4(module, multicastAddr, localAddr)** +**ILibAsyncUDPSocket_DropMulticastGroupV6(module, multicastAddr, ifIndex)** +Leaves the specified multicast group, on the specified interface/index. + +**ILibAsyncUDPSocket_SetMulticastInterface(module, localInterface)** +Sets the local interface to use, when multicasting + +**ILibAsyncUDPSocket_SetMulticastTTL(module, TTL)** +Sets the Multicast TTL value + +**ILibAsyncUDPSocket_SetMulticastLoopback(module, loopback)** +Sets whether or not outbound multicasts are received on the local machine + +**ILibAsyncUDPSocket_SetBroadcast(module, enable)** +Enable/Disable the broadcast flag for the ILibAsyncUDPSocket object + +**ILibAsyncUDPSocket_GetPendingBytesToSend(socketModule)** +Returns the number of bytes that are pending to be sent + +**ILibAsyncUDPSocket_GetTotalBytesSent(socketModule)** +Returns the total number of bytes that have been sent, since the last reset + +**ILibAsyncUDPSocket_ResetTotalBytesSent(socketModule)** +Resets the total bytes sent counter + +**ILibAsyncUDPSocket_SendTo(socketModule, remoteInterface, buffer, length, UserFree)** +Sends a UDP packet to the specified address and port + +**ILibAsyncUDPSocket_GetLocalInterface(socketModule, localAddress)** +Fetches the bounded IP address in network order + +**ILibAsyncUDPSocket_SetLocalInterface(socketModule, localAddress)** +Sets the bounded IP address of the ILibAsyncUDPSocket object + +**ILibAsyncUDPSocket_GetLocalPort(socketModule)** +Fetches the bounded port in host order + +**ILibAsyncUDPSocket_Resume(socketModule)** +Resumes socket I/O of the ILibAsyncUDPSocket object + +**ILibAsyncUDPSocket_GetSocket(module)** +Fetches the associated socket descriptor of the ILibAsyncUDPSocket object