mirror of
https://github.com/SFML/CSFML.git
synced 2026-10-26 21:16:13 +01:00
Updated to the new time API (sfTime)
This commit is contained in:
1 parent
44d4c4e707
commit
7615382a68
28 files changed
+293
-95
No files matched your search
@@ -30,6 +30,7 @@
|
||||
////////////////////////////////////////////////////////////
|
||||
#include <SFML/Config.h>
|
||||
#include <SFML/Network/Types.h>
|
||||
#include <SFML/System/Time.h>
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
@@ -285,12 +286,12 @@ CSFML_API void sfHttp_SetHost(sfHttp* http, const char* host, unsigned short por
|
||||
///
|
||||
/// \param http Http object
|
||||
/// \param request Request to send
|
||||
/// \param timeout Maximum time to wait, in milliseconds
|
||||
/// \param timeout Maximum time to wait
|
||||
///
|
||||
/// \return Server's response
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfHttpResponse* sfHttp_SendRequest(sfHttp* http, const sfHttpRequest* request, sfUint32 timeout);
|
||||
CSFML_API sfHttpResponse* sfHttp_SendRequest(sfHttp* http, const sfHttpRequest* request, sfTime timeout);
|
||||
|
||||
|
||||
#endif // SFML_HTTP_H
|
||||
@@ -29,6 +29,7 @@
|
||||
// Headers
|
||||
////////////////////////////////////////////////////////////
|
||||
#include <SFML/Config.h>
|
||||
#include <SFML/System/Time.h>
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
@@ -146,12 +147,12 @@ CSFML_API sfIpAddress sfIpAddress_GetLocalAddress(void);
|
||||
/// to be possibly stuck waiting in case there is a problem; use
|
||||
/// 0 to deactivate this limit.
|
||||
///
|
||||
/// \param timeout Maximum time to wait, in milliseconds
|
||||
/// \param timeout Maximum time to wait
|
||||
///
|
||||
/// \return Public IP address of the computer
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfIpAddress sfIpAddress_GetPublicAddress(sfUint32 timeout);
|
||||
CSFML_API sfIpAddress sfIpAddress_GetPublicAddress(sfTime timeout);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the empty/invalid address
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
////////////////////////////////////////////////////////////
|
||||
#include <SFML/Config.h>
|
||||
#include <SFML/Network/Types.h>
|
||||
#include <SFML/System/Time.h>
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
@@ -109,12 +110,12 @@ CSFML_API void sfSocketSelector_Clear(sfSocketSelector* selector);
|
||||
/// is over, the function returns sfFalse.
|
||||
///
|
||||
/// \param selector Socket selector object
|
||||
/// \param timeout Maximum time to wait, in milliseconds (use 0 for infinity)
|
||||
/// \param timeout Maximum time to wait (use sfTimeZero for infinity)
|
||||
///
|
||||
/// \return sfTrue if there are sockets ready, sfFalse otherwise
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfBool sfSocketSelector_Wait(sfSocketSelector* selector, sfUint32 timeout);
|
||||
CSFML_API sfBool sfSocketSelector_Wait(sfSocketSelector* selector, sfTime timeout);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Test a socket to know if it is ready to receive data
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
#include <SFML/Network/IpAddress.h>
|
||||
#include <SFML/Network/SocketStatus.h>
|
||||
#include <SFML/Network/Types.h>
|
||||
#include <SFML/System/Time.h>
|
||||
#include <stddef.h>
|
||||
|
||||
|
||||
@@ -128,12 +129,12 @@ CSFML_API unsigned short sfTcpSocket_GetRemotePort(const sfTcpSocket* socket);
|
||||
/// \param socket TCP socket object
|
||||
/// \param remoteAddress Address of the remote peer
|
||||
/// \param remotePort Port of the remote peer
|
||||
/// \param timeout Maximum time to wait, in milliseconds
|
||||
/// \param timeout Maximum time to wait
|
||||
///
|
||||
/// \return Status code
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfSocketStatus sfTcpSocket_Connect(sfTcpSocket* socket, sfIpAddress host, unsigned short port, sfUint32 timeout);
|
||||
CSFML_API sfSocketStatus sfTcpSocket_Connect(sfTcpSocket* socket, sfIpAddress host, unsigned short port, sfTime timeout);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Disconnect a TCP socket from its remote peer
|
||||
|
||||
Reference in new issue
Block a user