Improved API documentation (copied from SFML)

This commit is contained in:
Laurent Gomila committed 2011-09-02 20:15:45 +02:00
1 parent c84a787d0a
commit d734c9df5c
50 files changed
+1606 -1478

No files matched your search

-27
View File
@@ -33,8 +33,6 @@
#include <string.h>
////////////////////////////////////////////////////////////
/// Construct a new TCP socket
////////////////////////////////////////////////////////////
sfTcpSocket* sfTcpSocket_Create(void)
{
@@ -42,8 +40,6 @@ sfTcpSocket* sfTcpSocket_Create(void)
}
////////////////////////////////////////////////////////////
/// Destroy an existing TCP socket
////////////////////////////////////////////////////////////
void sfTcpSocket_Destroy(sfTcpSocket* socket)
{
@@ -51,9 +47,6 @@ void sfTcpSocket_Destroy(sfTcpSocket* socket)
}
////////////////////////////////////////////////////////////
/// Change the blocking state of a TCP socket.
/// The default behaviour of a socket is blocking
////////////////////////////////////////////////////////////
void sfTcpSocket_SetBlocking(sfTcpSocket* socket, sfBool blocking)
{
@@ -61,8 +54,6 @@ void sfTcpSocket_SetBlocking(sfTcpSocket* socket, sfBool blocking)
}
////////////////////////////////////////////////////////////
/// Get the blocking state of the socket
////////////////////////////////////////////////////////////
sfBool sfTcpSocket_IsBlocking(const sfTcpSocket* socket)
{
@@ -70,8 +61,6 @@ sfBool sfTcpSocket_IsBlocking(const sfTcpSocket* socket)
}
////////////////////////////////////////////////////////////
/// Get the port to which a socket is bound locally
////////////////////////////////////////////////////////////
unsigned short sfTcpSocket_GetLocalPort(const sfTcpSocket* socket)
{
@@ -79,8 +68,6 @@ unsigned short sfTcpSocket_GetLocalPort(const sfTcpSocket* socket)
}
////////////////////////////////////////////////////////////
/// Get the address of the connected peer of a socket
////////////////////////////////////////////////////////////
sfIpAddress sfTcpSocket_GetRemoteAddress(const sfTcpSocket* socket)
{
@@ -94,8 +81,6 @@ sfIpAddress sfTcpSocket_GetRemoteAddress(const sfTcpSocket* socket)
}
////////////////////////////////////////////////////////////
/// Get the port of the connected peer to which a socket is connected
////////////////////////////////////////////////////////////
unsigned short sfTcpSocket_GetRemotePort(const sfTcpSocket* socket)
{
@@ -103,8 +88,6 @@ unsigned short sfTcpSocket_GetRemotePort(const sfTcpSocket* socket)
}
////////////////////////////////////////////////////////////
/// Connect a TCP socket to another computer on a specified port
////////////////////////////////////////////////////////////
sfSocketStatus sfTcpSocket_Connect(sfTcpSocket* socket, sfIpAddress host, unsigned short port, sfUint32 timeout)
{
@@ -116,8 +99,6 @@ sfSocketStatus sfTcpSocket_Connect(sfTcpSocket* socket, sfIpAddress host, unsign
}
////////////////////////////////////////////////////////////
/// Disconnect a connect from its remote peer
////////////////////////////////////////////////////////////
void sfTcpSocket_Disconnect(sfTcpSocket* socket)
{
@@ -125,8 +106,6 @@ void sfTcpSocket_Disconnect(sfTcpSocket* socket)
}
////////////////////////////////////////////////////////////
/// Send an array of bytes to the host (must be connected first)
////////////////////////////////////////////////////////////
sfSocketStatus sfTcpSocket_Send(sfTcpSocket* socket, const char* data, size_t size)
{
@@ -136,8 +115,6 @@ sfSocketStatus sfTcpSocket_Send(sfTcpSocket* socket, const char* data, size_t si
}
////////////////////////////////////////////////////////////
/// Receive an array of bytes from the host (must be connected first)
////////////////////////////////////////////////////////////
sfSocketStatus sfTcpSocket_Receive(sfTcpSocket* socket, char* data, size_t maxSize, size_t* sizeReceived)
{
@@ -155,8 +132,6 @@ sfSocketStatus sfTcpSocket_Receive(sfTcpSocket* socket, char* data, size_t maxSi
}
////////////////////////////////////////////////////////////
/// Send a packet of data to the host (must be connected first)
////////////////////////////////////////////////////////////
sfSocketStatus sfTcpSocket_SendPacket(sfTcpSocket* socket, sfPacket* packet)
{
@@ -167,8 +142,6 @@ sfSocketStatus sfTcpSocket_SendPacket(sfTcpSocket* socket, sfPacket* packet)
}
////////////////////////////////////////////////////////////
/// Receive a packet from the host (must be connected first)
////////////////////////////////////////////////////////////
sfSocketStatus sfTcpSocket_ReceivePacket(sfTcpSocket* socket, sfPacket* packet)
{