mirror of
https://github.com/SFML/CSFML.git
synced 2026-10-26 21:16:13 +01:00
Each module now has its own export macro
This commit is contained in:
1 parent
7615382a68
commit
0c5afa3483
70 files changed
+1010
-719
No files matched your search
@@ -0,0 +1,48 @@
|
||||
////////////////////////////////////////////////////////////
|
||||
//
|
||||
// SFML - Simple and Fast Multimedia Library
|
||||
// Copyright (C) 2007-2009 Laurent Gomila (laurent.gom@gmail.com)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
//
|
||||
// Permission is granted to anyone to use this software for any purpose,
|
||||
// including commercial applications, and to alter it and redistribute it freely,
|
||||
// subject to the following restrictions:
|
||||
//
|
||||
// 1. The origin of this software must not be misrepresented;
|
||||
// you must not claim that you wrote the original software.
|
||||
// If you use this software in a product, an acknowledgment
|
||||
// in the product documentation would be appreciated but is not required.
|
||||
//
|
||||
// 2. Altered source versions must be plainly marked as such,
|
||||
// and must not be misrepresented as being the original software.
|
||||
//
|
||||
// 3. This notice may not be removed or altered from any source distribution.
|
||||
//
|
||||
////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef SFML_NETWORK_EXPORT_H
|
||||
#define SFML_NETWORK_EXPORT_H
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
// Headers
|
||||
////////////////////////////////////////////////////////////
|
||||
#include <SFML/Config.h>
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
// Define portable import / export macros
|
||||
////////////////////////////////////////////////////////////
|
||||
#if defined(CSFML_NETWORK_EXPORTS)
|
||||
|
||||
#define CSFML_NETWORK_API CSFML_API_EXPORT
|
||||
|
||||
#else
|
||||
|
||||
#define CSFML_NETWORK_API CSFML_API_IMPORT
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#endif // SFML_NETWORK_EXPORT_H
|
||||
+33
-33
@@ -28,7 +28,7 @@
|
||||
////////////////////////////////////////////////////////////
|
||||
// Headers
|
||||
////////////////////////////////////////////////////////////
|
||||
#include <SFML/Config.h>
|
||||
#include <SFML/Network/Export.h>
|
||||
#include <SFML/Network/IpAddress.h>
|
||||
#include <SFML/Network/Types.h>
|
||||
#include <stddef.h>
|
||||
@@ -119,7 +119,7 @@ enum sfFtpStatus
|
||||
/// \param ftpListingResponse Ftp listing response to destroy
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfFtpListingResponse_Destroy(sfFtpListingResponse* ftpListingResponse);
|
||||
CSFML_NETWORK_API void sfFtpListingResponse_Destroy(sfFtpListingResponse* ftpListingResponse);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Check if a FTP listing response status code means a success
|
||||
@@ -132,7 +132,7 @@ CSFML_API void sfFtpListingResponse_Destroy(sfFtpListingResponse* ftpListingResp
|
||||
/// \return sfTrue if the status is a success, sfFalse if it is a failure
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfBool sfFtpListingResponse_IsOk(const sfFtpListingResponse* ftpListingResponse);
|
||||
CSFML_NETWORK_API sfBool sfFtpListingResponse_IsOk(const sfFtpListingResponse* ftpListingResponse);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the status code of a FTP listing response
|
||||
@@ -142,7 +142,7 @@ CSFML_API sfBool sfFtpListingResponse_IsOk(const sfFtpListingResponse* ftpListin
|
||||
/// \return Status code
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfFtpStatus sfFtpListingResponse_GetStatus(const sfFtpListingResponse* ftpListingResponse);
|
||||
CSFML_NETWORK_API sfFtpStatus sfFtpListingResponse_GetStatus(const sfFtpListingResponse* ftpListingResponse);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the full message contained in a FTP listing response
|
||||
@@ -152,7 +152,7 @@ CSFML_API sfFtpStatus sfFtpListingResponse_GetStatus(const sfFtpListingResponse*
|
||||
/// \return The response message
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API const char* sfFtpListingResponse_GetMessage(const sfFtpListingResponse* ftpListingResponse);
|
||||
CSFML_NETWORK_API const char* sfFtpListingResponse_GetMessage(const sfFtpListingResponse* ftpListingResponse);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Return the number of filenames contained in a FTP listing response
|
||||
@@ -162,7 +162,7 @@ CSFML_API const char* sfFtpListingResponse_GetMessage(const sfFtpListingResponse
|
||||
/// \return Total number of filenames available
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API size_t sfFtpListingResponse_GetCount(const sfFtpListingResponse* ftpListingResponse);
|
||||
CSFML_NETWORK_API size_t sfFtpListingResponse_GetCount(const sfFtpListingResponse* ftpListingResponse);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Return a filename contained in a FTP listing response
|
||||
@@ -173,7 +173,7 @@ CSFML_API size_t sfFtpListingResponse_GetCount(const sfFtpListingResponse* ftpLi
|
||||
/// \return Array containing the requested filenames
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API const char* sfFtpListingResponse_GetFilename(const sfFtpListingResponse* ftpListingResponse, size_t index);
|
||||
CSFML_NETWORK_API const char* sfFtpListingResponse_GetFilename(const sfFtpListingResponse* ftpListingResponse, size_t index);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Destroy a FTP directory response
|
||||
@@ -181,7 +181,7 @@ CSFML_API const char* sfFtpListingResponse_GetFilename(const sfFtpListingRespons
|
||||
/// \param ftpDirectoryResponse Ftp directory response to destroy
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfFtpDirectoryResponse_Destroy(sfFtpDirectoryResponse* ftpDirectoryResponse);
|
||||
CSFML_NETWORK_API void sfFtpDirectoryResponse_Destroy(sfFtpDirectoryResponse* ftpDirectoryResponse);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Check if a FTP directory response status code means a success
|
||||
@@ -194,7 +194,7 @@ CSFML_API void sfFtpDirectoryResponse_Destroy(sfFtpDirectoryResponse* ftpDirecto
|
||||
/// \return sfTrue if the status is a success, sfFalse if it is a failure
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfBool sfFtpDirectoryResponse_IsOk(const sfFtpDirectoryResponse* ftpDirectoryResponse);
|
||||
CSFML_NETWORK_API sfBool sfFtpDirectoryResponse_IsOk(const sfFtpDirectoryResponse* ftpDirectoryResponse);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the status code of a FTP directory response
|
||||
@@ -204,7 +204,7 @@ CSFML_API sfBool sfFtpDirectoryResponse_IsOk(const sfFtpDirectoryResponse* ftpDi
|
||||
/// \return Status code
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfFtpStatus sfFtpDirectoryResponse_GetStatus(const sfFtpDirectoryResponse* ftpDirectoryResponse);
|
||||
CSFML_NETWORK_API sfFtpStatus sfFtpDirectoryResponse_GetStatus(const sfFtpDirectoryResponse* ftpDirectoryResponse);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the full message contained in a FTP directory response
|
||||
@@ -214,7 +214,7 @@ CSFML_API sfFtpStatus sfFtpDirectoryResponse_GetStatus(const sfFtpDirectoryRespo
|
||||
/// \return The response message
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API const char* sfFtpDirectoryResponse_GetMessage(const sfFtpDirectoryResponse* ftpDirectoryResponse);
|
||||
CSFML_NETWORK_API const char* sfFtpDirectoryResponse_GetMessage(const sfFtpDirectoryResponse* ftpDirectoryResponse);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the directory returned in a FTP directory response
|
||||
@@ -224,7 +224,7 @@ CSFML_API const char* sfFtpDirectoryResponse_GetMessage(const sfFtpDirectoryResp
|
||||
/// \return Directory name
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API const char* sfFtpDirectoryResponse_GetDirectory(const sfFtpDirectoryResponse* ftpDirectoryResponse);
|
||||
CSFML_NETWORK_API const char* sfFtpDirectoryResponse_GetDirectory(const sfFtpDirectoryResponse* ftpDirectoryResponse);
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
@@ -233,7 +233,7 @@ CSFML_API const char* sfFtpDirectoryResponse_GetDirectory(const sfFtpDirectoryRe
|
||||
/// \param ftpResponse Ftp response to destroy
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfFtpResponse_Destroy(sfFtpResponse* ftpResponse);
|
||||
CSFML_NETWORK_API void sfFtpResponse_Destroy(sfFtpResponse* ftpResponse);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Check if a FTP response status code means a success
|
||||
@@ -246,7 +246,7 @@ CSFML_API void sfFtpResponse_Destroy(sfFtpResponse* ftpResponse);
|
||||
/// \return sfTrue if the status is a success, sfFalse if it is a failure
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfBool sfFtpResponse_IsOk(const sfFtpResponse* ftpResponse);
|
||||
CSFML_NETWORK_API sfBool sfFtpResponse_IsOk(const sfFtpResponse* ftpResponse);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the status code of a FTP response
|
||||
@@ -256,7 +256,7 @@ CSFML_API sfBool sfFtpResponse_IsOk(const sfFtpResponse* ftpResponse);
|
||||
/// \return Status code
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfFtpStatus sfFtpResponse_GetStatus(const sfFtpResponse* ftpResponse);
|
||||
CSFML_NETWORK_API sfFtpStatus sfFtpResponse_GetStatus(const sfFtpResponse* ftpResponse);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the full message contained in a FTP response
|
||||
@@ -266,7 +266,7 @@ CSFML_API sfFtpStatus sfFtpResponse_GetStatus(const sfFtpResponse* ftpResponse);
|
||||
/// \return The response message
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API const char* sfFtpResponse_GetMessage(const sfFtpResponse* ftpResponse);
|
||||
CSFML_NETWORK_API const char* sfFtpResponse_GetMessage(const sfFtpResponse* ftpResponse);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Create a new Ftp object
|
||||
@@ -274,7 +274,7 @@ CSFML_API const char* sfFtpResponse_GetMessage(const sfFtpResponse* ftpResponse)
|
||||
/// \return A new sfFtp object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfFtp* sfFtp_Create(void);
|
||||
CSFML_NETWORK_API sfFtp* sfFtp_Create(void);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Destroy a Ftp object
|
||||
@@ -282,7 +282,7 @@ CSFML_API sfFtp* sfFtp_Create(void);
|
||||
/// \param ftp Ftp object to destroy
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfFtp_Destroy(sfFtp* ftp);
|
||||
CSFML_NETWORK_API void sfFtp_Destroy(sfFtp* ftp);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Connect to the specified FTP server
|
||||
@@ -304,7 +304,7 @@ CSFML_API void sfFtp_Destroy(sfFtp* ftp);
|
||||
/// \return Server response to the request
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfFtpResponse* sfFtp_Connect(sfFtp* ftp, sfIpAddress server, unsigned short port, sfUint32 timeout);
|
||||
CSFML_NETWORK_API sfFtpResponse* sfFtp_Connect(sfFtp* ftp, sfIpAddress server, unsigned short port, sfUint32 timeout);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Log in using an anonymous account
|
||||
@@ -317,7 +317,7 @@ CSFML_API sfFtpResponse* sfFtp_Connect(sfFtp* ftp, sfIpAddress server, unsigned
|
||||
/// \return Server response to the request
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfFtpResponse* sfFtp_LoginAnonymous(sfFtp* ftp);
|
||||
CSFML_NETWORK_API sfFtpResponse* sfFtp_LoginAnonymous(sfFtp* ftp);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Log in using a username and a password
|
||||
@@ -332,7 +332,7 @@ CSFML_API sfFtpResponse* sfFtp_LoginAnonymous(sfFtp* ftp);
|
||||
/// \return Server response to the request
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfFtpResponse* sfFtp_Login(sfFtp* ftp, const char* userName, const char* password);
|
||||
CSFML_NETWORK_API sfFtpResponse* sfFtp_Login(sfFtp* ftp, const char* userName, const char* password);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Close the connection with the server
|
||||
@@ -342,7 +342,7 @@ CSFML_API sfFtpResponse* sfFtp_Login(sfFtp* ftp, const char* userName, const cha
|
||||
/// \return Server response to the request
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfFtpResponse* sfFtp_Disconnect(sfFtp* ftp);
|
||||
CSFML_NETWORK_API sfFtpResponse* sfFtp_Disconnect(sfFtp* ftp);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Send a null command to keep the connection alive
|
||||
@@ -355,7 +355,7 @@ CSFML_API sfFtpResponse* sfFtp_Disconnect(sfFtp* ftp);
|
||||
/// \return Server response to the request
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfFtpResponse* sfFtp_KeepAlive(sfFtp* ftp);
|
||||
CSFML_NETWORK_API sfFtpResponse* sfFtp_KeepAlive(sfFtp* ftp);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the current working directory
|
||||
@@ -368,7 +368,7 @@ CSFML_API sfFtpResponse* sfFtp_KeepAlive(sfFtp* ftp);
|
||||
/// \return Server response to the request
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfFtpDirectoryResponse* sfFtp_GetWorkingDirectory(sfFtp* ftp);
|
||||
CSFML_NETWORK_API sfFtpDirectoryResponse* sfFtp_GetWorkingDirectory(sfFtp* ftp);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the contents of the given directory
|
||||
@@ -384,7 +384,7 @@ CSFML_API sfFtpDirectoryResponse* sfFtp_GetWorkingDirectory(sfFtp* ftp);
|
||||
/// \return Server response to the request
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfFtpListingResponse* sfFtp_GetDirectoryListing(sfFtp* ftp, const char* directory);
|
||||
CSFML_NETWORK_API sfFtpListingResponse* sfFtp_GetDirectoryListing(sfFtp* ftp, const char* directory);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Change the current working directory
|
||||
@@ -397,7 +397,7 @@ CSFML_API sfFtpListingResponse* sfFtp_GetDirectoryListing(sfFtp* ftp, const char
|
||||
/// \return Server response to the request
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfFtpResponse* sfFtp_ChangeDirectory(sfFtp* ftp, const char* directory);
|
||||
CSFML_NETWORK_API sfFtpResponse* sfFtp_ChangeDirectory(sfFtp* ftp, const char* directory);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Go to the parent directory of the current one
|
||||
@@ -407,7 +407,7 @@ CSFML_API sfFtpResponse* sfFtp_ChangeDirectory(sfFtp* ftp, const char* directory
|
||||
/// \return Server response to the request
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfFtpResponse* sfFtp_ParentDirectory(sfFtp* ftp);
|
||||
CSFML_NETWORK_API sfFtpResponse* sfFtp_ParentDirectory(sfFtp* ftp);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Create a new directory
|
||||
@@ -421,7 +421,7 @@ CSFML_API sfFtpResponse* sfFtp_ParentDirectory(sfFtp* ftp);
|
||||
/// \return Server response to the request
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfFtpResponse* sfFtp_CreateDirectory(sfFtp* ftp, const char* name);
|
||||
CSFML_NETWORK_API sfFtpResponse* sfFtp_CreateDirectory(sfFtp* ftp, const char* name);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Remove an existing directory
|
||||
@@ -437,7 +437,7 @@ CSFML_API sfFtpResponse* sfFtp_CreateDirectory(sfFtp* ftp, const char* name);
|
||||
/// \return Server response to the request
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfFtpResponse* sfFtp_DeleteDirectory(sfFtp* ftp, const char* name);
|
||||
CSFML_NETWORK_API sfFtpResponse* sfFtp_DeleteDirectory(sfFtp* ftp, const char* name);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Rename an existing file
|
||||
@@ -452,7 +452,7 @@ CSFML_API sfFtpResponse* sfFtp_DeleteDirectory(sfFtp* ftp, const char* name);
|
||||
/// \return Server response to the request
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfFtpResponse* sfFtp_RenameFile(sfFtp* ftp, const char* file, const char* newName);
|
||||
CSFML_NETWORK_API sfFtpResponse* sfFtp_RenameFile(sfFtp* ftp, const char* file, const char* newName);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Remove an existing file
|
||||
@@ -468,7 +468,7 @@ CSFML_API sfFtpResponse* sfFtp_RenameFile(sfFtp* ftp, const char* file, const ch
|
||||
/// \return Server response to the request
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfFtpResponse* sfFtp_DeleteFile(sfFtp* ftp, const char* name);
|
||||
CSFML_NETWORK_API sfFtpResponse* sfFtp_DeleteFile(sfFtp* ftp, const char* name);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Download a file from a FTP server
|
||||
@@ -486,7 +486,7 @@ CSFML_API sfFtpResponse* sfFtp_DeleteFile(sfFtp* ftp, const char* name);
|
||||
/// \return Server response to the request
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfFtpResponse* sfFtp_Download(sfFtp* ftp, const char* distantFile, const char* destPath, sfFtpTransferMode mode);
|
||||
CSFML_NETWORK_API sfFtpResponse* sfFtp_Download(sfFtp* ftp, const char* distantFile, const char* destPath, sfFtpTransferMode mode);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Upload a file to a FTP server
|
||||
@@ -504,7 +504,7 @@ CSFML_API sfFtpResponse* sfFtp_Download(sfFtp* ftp, const char* distantFile, con
|
||||
/// \return Server response to the request
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfFtpResponse* sfFtp_Upload(sfFtp* ftp, const char* localFile, const char* destPath, sfFtpTransferMode mode);
|
||||
CSFML_NETWORK_API sfFtpResponse* sfFtp_Upload(sfFtp* ftp, const char* localFile, const char* destPath, sfFtpTransferMode mode);
|
||||
|
||||
|
||||
#endif // SFML_FTP_H
|
||||
+18
-18
@@ -28,7 +28,7 @@
|
||||
////////////////////////////////////////////////////////////
|
||||
// Headers
|
||||
////////////////////////////////////////////////////////////
|
||||
#include <SFML/Config.h>
|
||||
#include <SFML/Network/Export.h>
|
||||
#include <SFML/Network/Types.h>
|
||||
#include <SFML/System/Time.h>
|
||||
|
||||
@@ -87,7 +87,7 @@ enum sfHttpStatus
|
||||
/// \return A new sfHttpRequest object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfHttpRequest* sfHttpRequest_Create(void);
|
||||
CSFML_NETWORK_API sfHttpRequest* sfHttpRequest_Create(void);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Destroy a HTTP request
|
||||
@@ -95,7 +95,7 @@ CSFML_API sfHttpRequest* sfHttpRequest_Create(void);
|
||||
/// \param httpRequest HTTP request to destroy
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfHttpRequest_Destroy(sfHttpRequest* httpRequest);
|
||||
CSFML_NETWORK_API void sfHttpRequest_Destroy(sfHttpRequest* httpRequest);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the value of a header field of a HTTP request
|
||||
@@ -111,7 +111,7 @@ CSFML_API void sfHttpRequest_Destroy(sfHttpRequest* httpRequest);
|
||||
/// \param value Value of the field
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfHttpRequest_SetField(sfHttpRequest* httpRequest, const char* field, const char* value);
|
||||
CSFML_NETWORK_API void sfHttpRequest_SetField(sfHttpRequest* httpRequest, const char* field, const char* value);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set a HTTP request method
|
||||
@@ -124,7 +124,7 @@ CSFML_API void sfHttpRequest_SetField(sfHttpRequest* httpRequest, const char* fi
|
||||
/// \param method Method to use for the request
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfHttpRequest_SetMethod(sfHttpRequest* httpRequest, sfHttpMethod method);
|
||||
CSFML_NETWORK_API void sfHttpRequest_SetMethod(sfHttpRequest* httpRequest, sfHttpMethod method);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set a HTTP request URI
|
||||
@@ -137,7 +137,7 @@ CSFML_API void sfHttpRequest_SetMethod(sfHttpRequest* httpRequest, sfHttpMethod
|
||||
/// \param uri URI to request, relative to the host
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfHttpRequest_SetUri(sfHttpRequest* httpRequest, const char* uri);
|
||||
CSFML_NETWORK_API void sfHttpRequest_SetUri(sfHttpRequest* httpRequest, const char* uri);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the HTTP version of a HTTP request
|
||||
@@ -149,7 +149,7 @@ CSFML_API void sfHttpRequest_SetUri(sfHttpRequest* httpRequest, const char* uri)
|
||||
/// \param minor Minor HTTP version number
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfHttpRequest_SetHttpVersion(sfHttpRequest* httpRequest, unsigned int major, unsigned int minor);
|
||||
CSFML_NETWORK_API void sfHttpRequest_SetHttpVersion(sfHttpRequest* httpRequest, unsigned int major, unsigned int minor);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the body of a HTTP request
|
||||
@@ -162,7 +162,7 @@ CSFML_API void sfHttpRequest_SetHttpVersion(sfHttpRequest* httpRequest, unsigned
|
||||
/// \param body Content of the body
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfHttpRequest_SetBody(sfHttpRequest* httpRequest, const char* body);
|
||||
CSFML_NETWORK_API void sfHttpRequest_SetBody(sfHttpRequest* httpRequest, const char* body);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Destroy a HTTP response
|
||||
@@ -170,7 +170,7 @@ CSFML_API void sfHttpRequest_SetBody(sfHttpRequest* httpRequest, const char* bod
|
||||
/// \param httpResponse HTTP response to destroy
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfHttpResponse_Destroy(sfHttpResponse* httpResponse);
|
||||
CSFML_NETWORK_API void sfHttpResponse_Destroy(sfHttpResponse* httpResponse);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the value of a field of a HTTP response
|
||||
@@ -185,7 +185,7 @@ CSFML_API void sfHttpResponse_Destroy(sfHttpResponse* httpResponse);
|
||||
/// \return Value of the field, or empty string if not found
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API const char* sfHttpResponse_GetField(const sfHttpResponse* httpResponse, const char* field);
|
||||
CSFML_NETWORK_API const char* sfHttpResponse_GetField(const sfHttpResponse* httpResponse, const char* field);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the status code of a HTTP reponse
|
||||
@@ -200,7 +200,7 @@ CSFML_API const char* sfHttpResponse_GetField(const sfHttpResponse* httpResponse
|
||||
/// \return Status code of the response
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfHttpStatus sfHttpResponse_GetStatus(const sfHttpResponse* httpResponse);
|
||||
CSFML_NETWORK_API sfHttpStatus sfHttpResponse_GetStatus(const sfHttpResponse* httpResponse);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the major HTTP version number of a HTTP response
|
||||
@@ -210,7 +210,7 @@ CSFML_API sfHttpStatus sfHttpResponse_GetStatus(const sfHttpResponse* httpRespon
|
||||
/// \return Major HTTP version number
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API unsigned int sfHttpResponse_GetMajorVersion(const sfHttpResponse* httpResponse);
|
||||
CSFML_NETWORK_API unsigned int sfHttpResponse_GetMajorVersion(const sfHttpResponse* httpResponse);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the minor HTTP version number of a HTTP response
|
||||
@@ -220,7 +220,7 @@ CSFML_API unsigned int sfHttpResponse_GetMajorVersion(const sfHttpResponse* http
|
||||
/// \return Minor HTTP version number
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API unsigned int sfHttpResponse_GetMinorVersion(const sfHttpResponse* httpResponse);
|
||||
CSFML_NETWORK_API unsigned int sfHttpResponse_GetMinorVersion(const sfHttpResponse* httpResponse);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the body of a HTTP response
|
||||
@@ -236,7 +236,7 @@ CSFML_API unsigned int sfHttpResponse_GetMinorVersion(const sfHttpResponse* http
|
||||
/// \return The response body
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API const char* sfHttpResponse_GetBody(const sfHttpResponse* httpResponse);
|
||||
CSFML_NETWORK_API const char* sfHttpResponse_GetBody(const sfHttpResponse* httpResponse);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Create a new Http object
|
||||
@@ -244,7 +244,7 @@ CSFML_API const char* sfHttpResponse_GetBody(const sfHttpResponse* httpResponse)
|
||||
/// \return A new sfHttp object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfHttp* sfHttp_Create(void);
|
||||
CSFML_NETWORK_API sfHttp* sfHttp_Create(void);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Destroy a Http object
|
||||
@@ -252,7 +252,7 @@ CSFML_API sfHttp* sfHttp_Create(void);
|
||||
/// \param http Http object to destroy
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfHttp_Destroy(sfHttp* http);
|
||||
CSFML_NETWORK_API void sfHttp_Destroy(sfHttp* http);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the target host of a HTTP object
|
||||
@@ -270,7 +270,7 @@ CSFML_API void sfHttp_Destroy(sfHttp* http);
|
||||
/// \param port Port to use for connection
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfHttp_SetHost(sfHttp* http, const char* host, unsigned short port);
|
||||
CSFML_NETWORK_API void sfHttp_SetHost(sfHttp* http, const char* host, unsigned short port);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Send a HTTP request and return the server's response.
|
||||
@@ -291,7 +291,7 @@ CSFML_API void sfHttp_SetHost(sfHttp* http, const char* host, unsigned short por
|
||||
/// \return Server's response
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfHttpResponse* sfHttp_SendRequest(sfHttp* http, const sfHttpRequest* request, sfTime timeout);
|
||||
CSFML_NETWORK_API sfHttpResponse* sfHttp_SendRequest(sfHttp* http, const sfHttpRequest* request, sfTime timeout);
|
||||
|
||||
|
||||
#endif // SFML_HTTP_H
|
||||
@@ -28,7 +28,7 @@
|
||||
////////////////////////////////////////////////////////////
|
||||
// Headers
|
||||
////////////////////////////////////////////////////////////
|
||||
#include <SFML/Config.h>
|
||||
#include <SFML/Network/Export.h>
|
||||
#include <SFML/System/Time.h>
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ typedef struct
|
||||
/// \return Resulting address
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfIpAddress sfIpAddress_FromString(const char* address);
|
||||
CSFML_NETWORK_API sfIpAddress sfIpAddress_FromString(const char* address);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Create an address from 4 bytes
|
||||
@@ -71,7 +71,7 @@ CSFML_API sfIpAddress sfIpAddress_FromString(const char* address);
|
||||
/// \return Resulting address
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfIpAddress sfIpAddress_FromBytes(sfUint8 byte0, sfUint8 byte1, sfUint8 byte2, sfUint8 byte3);
|
||||
CSFML_NETWORK_API sfIpAddress sfIpAddress_FromBytes(sfUint8 byte0, sfUint8 byte1, sfUint8 byte2, sfUint8 byte3);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Construct an address from a 32-bits integer
|
||||
@@ -86,7 +86,7 @@ CSFML_API sfIpAddress sfIpAddress_FromBytes(sfUint8 byte0, sfUint8 byte1, sfUint
|
||||
/// \return Resulting address
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfIpAddress sfIpAddress_FromInteger(sfUint32 address);
|
||||
CSFML_NETWORK_API sfIpAddress sfIpAddress_FromInteger(sfUint32 address);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get a string representation of an address
|
||||
@@ -100,7 +100,7 @@ CSFML_API sfIpAddress sfIpAddress_FromInteger(sfUint32 address);
|
||||
/// \return String representation of the address
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfIpAddress_ToString(sfIpAddress address, char* string);
|
||||
CSFML_NETWORK_API void sfIpAddress_ToString(sfIpAddress address, char* string);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get an integer representation of the address
|
||||
@@ -116,7 +116,7 @@ CSFML_API void sfIpAddress_ToString(sfIpAddress address, char* string);
|
||||
/// \return 32-bits unsigned integer representation of the address
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfUint32 sfIpAddress_ToInteger(sfIpAddress address);
|
||||
CSFML_NETWORK_API sfUint32 sfIpAddress_ToInteger(sfIpAddress address);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the computer's local address
|
||||
@@ -130,7 +130,7 @@ CSFML_API sfUint32 sfIpAddress_ToInteger(sfIpAddress address);
|
||||
/// \return Local IP address of the computer
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfIpAddress sfIpAddress_GetLocalAddress(void);
|
||||
CSFML_NETWORK_API sfIpAddress sfIpAddress_GetLocalAddress(void);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the computer's public address
|
||||
@@ -152,7 +152,7 @@ CSFML_API sfIpAddress sfIpAddress_GetLocalAddress(void);
|
||||
/// \return Public IP address of the computer
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfIpAddress sfIpAddress_GetPublicAddress(sfTime timeout);
|
||||
CSFML_NETWORK_API sfIpAddress sfIpAddress_GetPublicAddress(sfTime timeout);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the empty/invalid address
|
||||
@@ -160,7 +160,7 @@ CSFML_API sfIpAddress sfIpAddress_GetPublicAddress(sfTime timeout);
|
||||
/// \return Empty object that represents invalid addresses
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfIpAddress sfIpAddress_None(void);
|
||||
CSFML_NETWORK_API sfIpAddress sfIpAddress_None(void);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the computer's loopback address
|
||||
@@ -168,7 +168,7 @@ CSFML_API sfIpAddress sfIpAddress_None(void);
|
||||
/// \return Local host IP address (127.0.0.1, or "localhost")
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfIpAddress sfIpAddress_LocalHost(void);
|
||||
CSFML_NETWORK_API sfIpAddress sfIpAddress_LocalHost(void);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the UDP broadcast address
|
||||
@@ -176,7 +176,7 @@ CSFML_API sfIpAddress sfIpAddress_LocalHost(void);
|
||||
/// \return Broadcast IP address (255.255.255.255)
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfIpAddress sfIpAddress_Broadcast(void);
|
||||
CSFML_NETWORK_API sfIpAddress sfIpAddress_Broadcast(void);
|
||||
|
||||
|
||||
#endif // SFML_IPADDRESS_H
|
||||
@@ -28,7 +28,7 @@
|
||||
////////////////////////////////////////////////////////////
|
||||
// Headers
|
||||
////////////////////////////////////////////////////////////
|
||||
#include <SFML/Config.h>
|
||||
#include <SFML/Network/Export.h>
|
||||
#include <SFML/Network/Types.h>
|
||||
#include <stddef.h>
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
/// \return A new sfPacket object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfPacket* sfPacket_Create(void);
|
||||
CSFML_NETWORK_API sfPacket* sfPacket_Create(void);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Create a new packet by copying an existing one
|
||||
@@ -49,7 +49,7 @@ CSFML_API sfPacket* sfPacket_Create(void);
|
||||
/// \return A new sfPacket object which is a copy of \a packet
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfPacket* sfPacket_Copy(sfPacket* packet);
|
||||
CSFML_NETWORK_API sfPacket* sfPacket_Copy(sfPacket* packet);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Destroy a packet
|
||||
@@ -57,7 +57,7 @@ CSFML_API sfPacket* sfPacket_Copy(sfPacket* packet);
|
||||
/// \param packet Packet to destroy
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfPacket_Destroy(sfPacket* packet);
|
||||
CSFML_NETWORK_API void sfPacket_Destroy(sfPacket* packet);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Append data to the end of a packet
|
||||
@@ -67,7 +67,7 @@ CSFML_API void sfPacket_Destroy(sfPacket* packet);
|
||||
/// \param sizeInBytes Number of bytes to append
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfPacket_Append(sfPacket* packet, const void* data, size_t sizeInBytes);
|
||||
CSFML_NETWORK_API void sfPacket_Append(sfPacket* packet, const void* data, size_t sizeInBytes);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Clear a packet
|
||||
@@ -77,7 +77,7 @@ CSFML_API void sfPacket_Append(sfPacket* packet, const void* data, size_t sizeIn
|
||||
/// \param packet Packet object
|
||||
///
|
||||
///////////////////////////////////////////////////////////
|
||||
CSFML_API void sfPacket_Clear(sfPacket* packet);
|
||||
CSFML_NETWORK_API void sfPacket_Clear(sfPacket* packet);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get a pointer to the data contained in a packet
|
||||
@@ -92,7 +92,7 @@ CSFML_API void sfPacket_Clear(sfPacket* packet);
|
||||
/// \return Pointer to the data
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API const char* sfPacket_GetData(const sfPacket* packet);
|
||||
CSFML_NETWORK_API const char* sfPacket_GetData(const sfPacket* packet);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the size of the data contained in a packet
|
||||
@@ -105,7 +105,7 @@ CSFML_API const char* sfPacket_GetData(const sfPacket* packet);
|
||||
/// \return Data size, in bytes
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API size_t sfPacket_GetDataSize(const sfPacket* packet);
|
||||
CSFML_NETWORK_API size_t sfPacket_GetDataSize(const sfPacket* packet);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Tell if the reading position has reached the
|
||||
@@ -119,7 +119,7 @@ CSFML_API size_t sfPacket_GetDataSize(const sfPacket* packet);
|
||||
/// \return sfTrue if all data was read, sfFalse otherwise
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfBool sfPacket_EndOfPacket(const sfPacket* packet);
|
||||
CSFML_NETWORK_API sfBool sfPacket_EndOfPacket(const sfPacket* packet);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Test the validity of a packet, for reading
|
||||
@@ -135,7 +135,7 @@ CSFML_API sfBool sfPacket_EndOfPacket(const sfPacket* packet);
|
||||
/// \return sfTrue if last data extraction from packet was successful
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfBool sfPacket_CanRead(const sfPacket* packet);
|
||||
CSFML_NETWORK_API sfBool sfPacket_CanRead(const sfPacket* packet);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Functions to extract data from a packet
|
||||
@@ -143,17 +143,17 @@ CSFML_API sfBool sfPacket_CanRead(const sfPacket* packet);
|
||||
/// \param packet Packet object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfBool sfPacket_ReadBool(sfPacket* packet);
|
||||
CSFML_API sfInt8 sfPacket_ReadInt8(sfPacket* packet);
|
||||
CSFML_API sfUint8 sfPacket_ReadUint8(sfPacket* packet);
|
||||
CSFML_API sfInt16 sfPacket_ReadInt16(sfPacket* packet);
|
||||
CSFML_API sfUint16 sfPacket_ReadUint16(sfPacket* packet);
|
||||
CSFML_API sfInt32 sfPacket_ReadInt32(sfPacket* packet);
|
||||
CSFML_API sfUint32 sfPacket_ReadUint32(sfPacket* packet);
|
||||
CSFML_API float sfPacket_ReadFloat(sfPacket* packet);
|
||||
CSFML_API double sfPacket_ReadDouble(sfPacket* packet);
|
||||
CSFML_API void sfPacket_ReadString(sfPacket* packet, char* string);
|
||||
CSFML_API void sfPacket_ReadWideString(sfPacket* packet, wchar_t* string);
|
||||
CSFML_NETWORK_API sfBool sfPacket_ReadBool(sfPacket* packet);
|
||||
CSFML_NETWORK_API sfInt8 sfPacket_ReadInt8(sfPacket* packet);
|
||||
CSFML_NETWORK_API sfUint8 sfPacket_ReadUint8(sfPacket* packet);
|
||||
CSFML_NETWORK_API sfInt16 sfPacket_ReadInt16(sfPacket* packet);
|
||||
CSFML_NETWORK_API sfUint16 sfPacket_ReadUint16(sfPacket* packet);
|
||||
CSFML_NETWORK_API sfInt32 sfPacket_ReadInt32(sfPacket* packet);
|
||||
CSFML_NETWORK_API sfUint32 sfPacket_ReadUint32(sfPacket* packet);
|
||||
CSFML_NETWORK_API float sfPacket_ReadFloat(sfPacket* packet);
|
||||
CSFML_NETWORK_API double sfPacket_ReadDouble(sfPacket* packet);
|
||||
CSFML_NETWORK_API void sfPacket_ReadString(sfPacket* packet, char* string);
|
||||
CSFML_NETWORK_API void sfPacket_ReadWideString(sfPacket* packet, wchar_t* string);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Functions to insert data into a packet
|
||||
@@ -161,17 +161,17 @@ CSFML_API void sfPacket_ReadWideString(sfPacket* packet, wchar_t* string);
|
||||
/// \param packet Packet object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfPacket_WriteBool(sfPacket* packet, sfBool);
|
||||
CSFML_API void sfPacket_WriteInt8(sfPacket* packet, sfInt8);
|
||||
CSFML_API void sfPacket_WriteUint8(sfPacket* packet, sfUint8);
|
||||
CSFML_API void sfPacket_WriteInt16(sfPacket* packet, sfInt16);
|
||||
CSFML_API void sfPacket_WriteUint16(sfPacket* packet, sfUint16);
|
||||
CSFML_API void sfPacket_WriteInt32(sfPacket* packet, sfInt32);
|
||||
CSFML_API void sfPacket_WriteUint32(sfPacket* packet, sfUint32);
|
||||
CSFML_API void sfPacket_WriteFloat(sfPacket* packet, float);
|
||||
CSFML_API void sfPacket_WriteDouble(sfPacket* packet, double);
|
||||
CSFML_API void sfPacket_WriteString(sfPacket* packet, const char* string);
|
||||
CSFML_API void sfPacket_WriteWideString(sfPacket* packet, const wchar_t* string);
|
||||
CSFML_NETWORK_API void sfPacket_WriteBool(sfPacket* packet, sfBool);
|
||||
CSFML_NETWORK_API void sfPacket_WriteInt8(sfPacket* packet, sfInt8);
|
||||
CSFML_NETWORK_API void sfPacket_WriteUint8(sfPacket* packet, sfUint8);
|
||||
CSFML_NETWORK_API void sfPacket_WriteInt16(sfPacket* packet, sfInt16);
|
||||
CSFML_NETWORK_API void sfPacket_WriteUint16(sfPacket* packet, sfUint16);
|
||||
CSFML_NETWORK_API void sfPacket_WriteInt32(sfPacket* packet, sfInt32);
|
||||
CSFML_NETWORK_API void sfPacket_WriteUint32(sfPacket* packet, sfUint32);
|
||||
CSFML_NETWORK_API void sfPacket_WriteFloat(sfPacket* packet, float);
|
||||
CSFML_NETWORK_API void sfPacket_WriteDouble(sfPacket* packet, double);
|
||||
CSFML_NETWORK_API void sfPacket_WriteString(sfPacket* packet, const char* string);
|
||||
CSFML_NETWORK_API void sfPacket_WriteWideString(sfPacket* packet, const wchar_t* string);
|
||||
|
||||
|
||||
#endif // SFML_PACKET_H
|
||||
@@ -28,7 +28,7 @@
|
||||
////////////////////////////////////////////////////////////
|
||||
// Headers
|
||||
////////////////////////////////////////////////////////////
|
||||
#include <SFML/Config.h>
|
||||
#include <SFML/Network/Export.h>
|
||||
#include <SFML/Network/Types.h>
|
||||
#include <SFML/System/Time.h>
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
/// \return A new sfSocketSelector object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfSocketSelector* sfSocketSelector_Create(void);
|
||||
CSFML_NETWORK_API sfSocketSelector* sfSocketSelector_Create(void);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Create a new socket selector by copying an existing one
|
||||
@@ -49,7 +49,7 @@ CSFML_API sfSocketSelector* sfSocketSelector_Create(void);
|
||||
/// \return A new sfSocketSelector object which is a copy of \a selector
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfSocketSelector* sfSocketSelector_Copy(sfSocketSelector* selector);
|
||||
CSFML_NETWORK_API sfSocketSelector* sfSocketSelector_Copy(sfSocketSelector* selector);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Destroy a socket selector
|
||||
@@ -57,7 +57,7 @@ CSFML_API sfSocketSelector* sfSocketSelector_Copy(sfSocketSelector* selector);
|
||||
/// \param selector Socket selector to destroy
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSocketSelector_Destroy(sfSocketSelector* selector);
|
||||
CSFML_NETWORK_API void sfSocketSelector_Destroy(sfSocketSelector* selector);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Add a new socket to a socket selector
|
||||
@@ -70,9 +70,9 @@ CSFML_API void sfSocketSelector_Destroy(sfSocketSelector* selector);
|
||||
/// \param socket Pointer to the socket to add
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSocketSelector_AddTcpListener(sfSocketSelector* selector, sfTcpListener* socket);
|
||||
CSFML_API void sfSocketSelector_AddTcpSocket(sfSocketSelector* selector, sfTcpSocket* socket);
|
||||
CSFML_API void sfSocketSelector_AddUdpSocket(sfSocketSelector* selector, sfUdpSocket* socket);
|
||||
CSFML_NETWORK_API void sfSocketSelector_AddTcpListener(sfSocketSelector* selector, sfTcpListener* socket);
|
||||
CSFML_NETWORK_API void sfSocketSelector_AddTcpSocket(sfSocketSelector* selector, sfTcpSocket* socket);
|
||||
CSFML_NETWORK_API void sfSocketSelector_AddUdpSocket(sfSocketSelector* selector, sfUdpSocket* socket);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Remove a socket from a socket selector
|
||||
@@ -84,9 +84,9 @@ CSFML_API void sfSocketSelector_AddUdpSocket(sfSocketSelector* selector, sfUdpSo
|
||||
/// \param socket POointer to the socket to remove
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSocketSelector_RemoveTcpListener(sfSocketSelector* selector, sfTcpListener* socket);
|
||||
CSFML_API void sfSocketSelector_RemoveTcpSocket(sfSocketSelector* selector, sfTcpSocket* socket);
|
||||
CSFML_API void sfSocketSelector_RemoveUdpSocket(sfSocketSelector* selector, sfUdpSocket* socket);
|
||||
CSFML_NETWORK_API void sfSocketSelector_RemoveTcpListener(sfSocketSelector* selector, sfTcpListener* socket);
|
||||
CSFML_NETWORK_API void sfSocketSelector_RemoveTcpSocket(sfSocketSelector* selector, sfTcpSocket* socket);
|
||||
CSFML_NETWORK_API void sfSocketSelector_RemoveUdpSocket(sfSocketSelector* selector, sfUdpSocket* socket);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Remove all the sockets stored in a selector
|
||||
@@ -98,7 +98,7 @@ CSFML_API void sfSocketSelector_RemoveUdpSocket(sfSocketSelector* selector, sfUd
|
||||
/// \param selector Socket selector object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSocketSelector_Clear(sfSocketSelector* selector);
|
||||
CSFML_NETWORK_API void sfSocketSelector_Clear(sfSocketSelector* selector);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Wait until one or more sockets are ready to receive
|
||||
@@ -115,7 +115,7 @@ CSFML_API void sfSocketSelector_Clear(sfSocketSelector* selector);
|
||||
/// \return sfTrue if there are sockets ready, sfFalse otherwise
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfBool sfSocketSelector_Wait(sfSocketSelector* selector, sfTime timeout);
|
||||
CSFML_NETWORK_API sfBool sfSocketSelector_Wait(sfSocketSelector* selector, sfTime timeout);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Test a socket to know if it is ready to receive data
|
||||
@@ -133,9 +133,9 @@ CSFML_API sfBool sfSocketSelector_Wait(sfSocketSelector* selector, sfTime timeou
|
||||
/// \return sfTrue if the socket is ready to read, sfFalse otherwise
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfBool sfSocketSelector_IsTcpListenerReady(const sfSocketSelector* selector, sfTcpListener* socket);
|
||||
CSFML_API sfBool sfSocketSelector_IsTcpSocketReady(const sfSocketSelector* selector, sfTcpSocket* socket);
|
||||
CSFML_API sfBool sfSocketSelector_IsUdpSocketReady(const sfSocketSelector* selector, sfUdpSocket* socket);
|
||||
CSFML_NETWORK_API sfBool sfSocketSelector_IsTcpListenerReady(const sfSocketSelector* selector, sfTcpListener* socket);
|
||||
CSFML_NETWORK_API sfBool sfSocketSelector_IsTcpSocketReady(const sfSocketSelector* selector, sfTcpSocket* socket);
|
||||
CSFML_NETWORK_API sfBool sfSocketSelector_IsUdpSocketReady(const sfSocketSelector* selector, sfUdpSocket* socket);
|
||||
|
||||
|
||||
#endif // SFML_SOCKETSELECTOR_H
|
||||
@@ -28,7 +28,7 @@
|
||||
////////////////////////////////////////////////////////////
|
||||
// Headers
|
||||
////////////////////////////////////////////////////////////
|
||||
#include <SFML/Config.h>
|
||||
#include <SFML/Network/Export.h>
|
||||
#include <SFML/Network/SocketStatus.h>
|
||||
#include <SFML/Network/Types.h>
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
/// \return A new sfTcpListener object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfTcpListener* sfTcpListener_Create(void);
|
||||
CSFML_NETWORK_API sfTcpListener* sfTcpListener_Create(void);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Destroy a TCP listener
|
||||
@@ -47,7 +47,7 @@ CSFML_API sfTcpListener* sfTcpListener_Create(void);
|
||||
/// \param listener TCP listener to destroy
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfTcpListener_Destroy(sfTcpListener* listener);
|
||||
CSFML_NETWORK_API void sfTcpListener_Destroy(sfTcpListener* listener);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the blocking state of a TCP listener
|
||||
@@ -65,7 +65,7 @@ CSFML_API void sfTcpListener_Destroy(sfTcpListener* listener);
|
||||
/// \param blocking sfTrue to set the socket as blocking, sfFalse for non-blocking
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfTcpListener_SetBlocking(sfTcpListener* listener, sfBool blocking);
|
||||
CSFML_NETWORK_API void sfTcpListener_SetBlocking(sfTcpListener* listener, sfBool blocking);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Tell whether a TCP listener is in blocking or non-blocking mode
|
||||
@@ -75,7 +75,7 @@ CSFML_API void sfTcpListener_SetBlocking(sfTcpListener* listener, sfBool blockin
|
||||
/// \return sfTrue if the socket is blocking, sfFalse otherwise
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfBool sfTcpListener_IsBlocking(const sfTcpListener* listener);
|
||||
CSFML_NETWORK_API sfBool sfTcpListener_IsBlocking(const sfTcpListener* listener);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the port to which a TCP listener is bound locally
|
||||
@@ -88,7 +88,7 @@ CSFML_API sfBool sfTcpListener_IsBlocking(const sfTcpListener* listener);
|
||||
/// \return Port to which the TCP listener is bound
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API unsigned short sfTcpListener_GetLocalPort(const sfTcpListener* listener);
|
||||
CSFML_NETWORK_API unsigned short sfTcpListener_GetLocalPort(const sfTcpListener* listener);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Start listening for connections
|
||||
@@ -104,7 +104,7 @@ CSFML_API unsigned short sfTcpListener_GetLocalPort(const sfTcpListener* listene
|
||||
/// \return Status code
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfSocketStatus sfTcpListener_Listen(sfTcpListener* listener, unsigned short port);
|
||||
CSFML_NETWORK_API sfSocketStatus sfTcpListener_Listen(sfTcpListener* listener, unsigned short port);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Accept a new connection
|
||||
@@ -118,7 +118,7 @@ CSFML_API sfSocketStatus sfTcpListener_Listen(sfTcpListener* listener, unsigned
|
||||
/// \return Status code
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfSocketStatus sfTcpListener_Accept(sfTcpListener* listener, sfTcpSocket** connected);
|
||||
CSFML_NETWORK_API sfSocketStatus sfTcpListener_Accept(sfTcpListener* listener, sfTcpSocket** connected);
|
||||
|
||||
|
||||
#endif // SFML_TCPLISTENER_H
|
||||
@@ -28,7 +28,7 @@
|
||||
////////////////////////////////////////////////////////////
|
||||
// Headers
|
||||
////////////////////////////////////////////////////////////
|
||||
#include <SFML/Config.h>
|
||||
#include <SFML/Network/Export.h>
|
||||
#include <SFML/Network/IpAddress.h>
|
||||
#include <SFML/Network/SocketStatus.h>
|
||||
#include <SFML/Network/Types.h>
|
||||
@@ -42,7 +42,7 @@
|
||||
/// \return A new sfTcpSocket object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfTcpSocket* sfTcpSocket_Create(void);
|
||||
CSFML_NETWORK_API sfTcpSocket* sfTcpSocket_Create(void);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Destroy a TCP socket
|
||||
@@ -50,7 +50,7 @@ CSFML_API sfTcpSocket* sfTcpSocket_Create(void);
|
||||
/// \param socket TCP socket to destroy
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfTcpSocket_Destroy(sfTcpSocket* socket);
|
||||
CSFML_NETWORK_API void sfTcpSocket_Destroy(sfTcpSocket* socket);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the blocking state of a TCP listener
|
||||
@@ -68,7 +68,7 @@ CSFML_API void sfTcpSocket_Destroy(sfTcpSocket* socket);
|
||||
/// \param blocking sfTrue to set the socket as blocking, sfFalse for non-blocking
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfTcpSocket_SetBlocking(sfTcpSocket* socket, sfBool blocking);
|
||||
CSFML_NETWORK_API void sfTcpSocket_SetBlocking(sfTcpSocket* socket, sfBool blocking);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Tell whether a TCP socket is in blocking or non-blocking mode
|
||||
@@ -78,7 +78,7 @@ CSFML_API void sfTcpSocket_SetBlocking(sfTcpSocket* socket, sfBool blocking);
|
||||
/// \return sfTrue if the socket is blocking, sfFalse otherwise
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfBool sfTcpSocket_IsBlocking(const sfTcpSocket* socket);
|
||||
CSFML_NETWORK_API sfBool sfTcpSocket_IsBlocking(const sfTcpSocket* socket);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the port to which a TCP socket is bound locally
|
||||
@@ -90,7 +90,7 @@ CSFML_API sfBool sfTcpSocket_IsBlocking(const sfTcpSocket* socket);
|
||||
/// \return Port to which the socket is bound
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API unsigned short sfTcpSocket_GetLocalPort(const sfTcpSocket* socket);
|
||||
CSFML_NETWORK_API unsigned short sfTcpSocket_GetLocalPort(const sfTcpSocket* socket);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the address of the connected peer of a TCP socket
|
||||
@@ -103,7 +103,7 @@ CSFML_API unsigned short sfTcpSocket_GetLocalPort(const sfTcpSocket* socket);
|
||||
/// \return Address of the remote peer
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfIpAddress sfTcpSocket_GetRemoteAddress(const sfTcpSocket* socket);
|
||||
CSFML_NETWORK_API sfIpAddress sfTcpSocket_GetRemoteAddress(const sfTcpSocket* socket);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the port of the connected peer to which
|
||||
@@ -116,7 +116,7 @@ CSFML_API sfIpAddress sfTcpSocket_GetRemoteAddress(const sfTcpSocket* socket);
|
||||
/// \return Remote port to which the socket is connected
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API unsigned short sfTcpSocket_GetRemotePort(const sfTcpSocket* socket);
|
||||
CSFML_NETWORK_API unsigned short sfTcpSocket_GetRemotePort(const sfTcpSocket* socket);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Connect a TCP socket to a remote peer
|
||||
@@ -134,7 +134,7 @@ CSFML_API unsigned short sfTcpSocket_GetRemotePort(const sfTcpSocket* socket);
|
||||
/// \return Status code
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfSocketStatus sfTcpSocket_Connect(sfTcpSocket* socket, sfIpAddress host, unsigned short port, sfTime timeout);
|
||||
CSFML_NETWORK_API sfSocketStatus sfTcpSocket_Connect(sfTcpSocket* socket, sfIpAddress host, unsigned short port, sfTime timeout);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Disconnect a TCP socket from its remote peer
|
||||
@@ -145,7 +145,7 @@ CSFML_API sfSocketStatus sfTcpSocket_Connect(sfTcpSocket* socket, sfIpAddress ho
|
||||
/// \param socket TCP socket object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfTcpSocket_Disconnect(sfTcpSocket* socket);
|
||||
CSFML_NETWORK_API void sfTcpSocket_Disconnect(sfTcpSocket* socket);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Send raw data to the remote peer of a TCP socket
|
||||
@@ -159,7 +159,7 @@ CSFML_API void sfTcpSocket_Disconnect(sfTcpSocket* socket);
|
||||
/// \return Status code
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfSocketStatus sfTcpSocket_Send(sfTcpSocket* socket, const char* data, size_t size);
|
||||
CSFML_NETWORK_API sfSocketStatus sfTcpSocket_Send(sfTcpSocket* socket, const char* data, size_t size);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Receive raw data from the remote peer of a TCP socket
|
||||
@@ -176,7 +176,7 @@ CSFML_API sfSocketStatus sfTcpSocket_Send(sfTcpSocket* socket, const char* data,
|
||||
/// \return Status code
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfSocketStatus sfTcpSocket_Receive(sfTcpSocket* socket, char* data, size_t maxSize, size_t* sizeReceived);
|
||||
CSFML_NETWORK_API sfSocketStatus sfTcpSocket_Receive(sfTcpSocket* socket, char* data, size_t maxSize, size_t* sizeReceived);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Send a formatted packet of data to the remote peer of a TCP socket
|
||||
@@ -189,7 +189,7 @@ CSFML_API sfSocketStatus sfTcpSocket_Receive(sfTcpSocket* socket, char* data, si
|
||||
/// \return Status code
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfSocketStatus sfTcpSocket_SendPacket(sfTcpSocket* socket, sfPacket* packet);
|
||||
CSFML_NETWORK_API sfSocketStatus sfTcpSocket_SendPacket(sfTcpSocket* socket, sfPacket* packet);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Receive a formatted packet of data from the remote peer
|
||||
@@ -204,7 +204,7 @@ CSFML_API sfSocketStatus sfTcpSocket_SendPacket(sfTcpSocket* socket, sfPacket* p
|
||||
/// \return Status code
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfSocketStatus sfTcpSocket_ReceivePacket(sfTcpSocket* socket, sfPacket* packet);
|
||||
CSFML_NETWORK_API sfSocketStatus sfTcpSocket_ReceivePacket(sfTcpSocket* socket, sfPacket* packet);
|
||||
|
||||
|
||||
#endif // SFML_TCPSOCKET_H
|
||||
@@ -28,7 +28,7 @@
|
||||
////////////////////////////////////////////////////////////
|
||||
// Headers
|
||||
////////////////////////////////////////////////////////////
|
||||
#include <SFML/Config.h>
|
||||
#include <SFML/Network/Export.h>
|
||||
#include <SFML/Network/IpAddress.h>
|
||||
#include <SFML/Network/SocketStatus.h>
|
||||
#include <SFML/Network/Types.h>
|
||||
@@ -41,7 +41,7 @@
|
||||
/// \return A new sfUdpSocket object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfUdpSocket* sfUdpSocket_Create(void);
|
||||
CSFML_NETWORK_API sfUdpSocket* sfUdpSocket_Create(void);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Destroy a UDP socket
|
||||
@@ -49,7 +49,7 @@ CSFML_API sfUdpSocket* sfUdpSocket_Create(void);
|
||||
/// \param socket UDP socket to destroy
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfUdpSocket_Destroy(sfUdpSocket* socket);
|
||||
CSFML_NETWORK_API void sfUdpSocket_Destroy(sfUdpSocket* socket);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the blocking state of a UDP listener
|
||||
@@ -67,7 +67,7 @@ CSFML_API void sfUdpSocket_Destroy(sfUdpSocket* socket);
|
||||
/// \param blocking sfTrue to set the socket as blocking, sfFalse for non-blocking
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfUdpSocket_SetBlocking(sfUdpSocket* socket, sfBool blocking);
|
||||
CSFML_NETWORK_API void sfUdpSocket_SetBlocking(sfUdpSocket* socket, sfBool blocking);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Tell whether a UDP socket is in blocking or non-blocking mode
|
||||
@@ -77,7 +77,7 @@ CSFML_API void sfUdpSocket_SetBlocking(sfUdpSocket* socket, sfBool blocking);
|
||||
/// \return sfTrue if the socket is blocking, sfFalse otherwise
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfBool sfUdpSocket_IsBlocking(const sfUdpSocket* socket);
|
||||
CSFML_NETWORK_API sfBool sfUdpSocket_IsBlocking(const sfUdpSocket* socket);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the port to which a UDP socket is bound locally
|
||||
@@ -90,7 +90,7 @@ CSFML_API sfBool sfUdpSocket_IsBlocking(const sfUdpSocket* socket);
|
||||
/// \return Port to which the socket is bound
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API unsigned short sfUdpSocket_GetLocalPort(const sfUdpSocket* socket);
|
||||
CSFML_NETWORK_API unsigned short sfUdpSocket_GetLocalPort(const sfUdpSocket* socket);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Bind a UDP socket to a specific port
|
||||
@@ -107,7 +107,7 @@ CSFML_API unsigned short sfUdpSocket_GetLocalPort(const sfUdpSocket* socket);
|
||||
/// \return Status code
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfSocketStatus sfUdpSocket_Bind(sfUdpSocket* socket, unsigned short port);
|
||||
CSFML_NETWORK_API sfSocketStatus sfUdpSocket_Bind(sfUdpSocket* socket, unsigned short port);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Unbind a UDP socket from the local port to which it is bound
|
||||
@@ -119,7 +119,7 @@ CSFML_API sfSocketStatus sfUdpSocket_Bind(sfUdpSocket* socket, unsigned short po
|
||||
/// \param socket UDP socket object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfUdpSocket_Unbind(sfUdpSocket* socket);
|
||||
CSFML_NETWORK_API void sfUdpSocket_Unbind(sfUdpSocket* socket);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Send raw data to a remote peer with a UDP socket
|
||||
@@ -137,7 +137,7 @@ CSFML_API void sfUdpSocket_Unbind(sfUdpSocket* socket);
|
||||
/// \return Status code
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfSocketStatus sfUdpSocket_Send(sfUdpSocket* socket, const char* data, size_t size, sfIpAddress address, unsigned short port);
|
||||
CSFML_NETWORK_API sfSocketStatus sfUdpSocket_Send(sfUdpSocket* socket, const char* data, size_t size, sfIpAddress address, unsigned short port);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Receive raw data from a remote peer with a UDP socket
|
||||
@@ -159,7 +159,7 @@ CSFML_API sfSocketStatus sfUdpSocket_Send(sfUdpSocket* socket, const char* data,
|
||||
/// \return Status code
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfSocketStatus sfUdpSocket_Receive(sfUdpSocket* socket, char* data, size_t maxSize, size_t* sizeReceived, sfIpAddress* address, unsigned short* port);
|
||||
CSFML_NETWORK_API sfSocketStatus sfUdpSocket_Receive(sfUdpSocket* socket, char* data, size_t maxSize, size_t* sizeReceived, sfIpAddress* address, unsigned short* port);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Send a formatted packet of data to a remote peer with a UDP socket
|
||||
@@ -176,7 +176,7 @@ CSFML_API sfSocketStatus sfUdpSocket_Receive(sfUdpSocket* socket, char* data, si
|
||||
/// \return Status code
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfSocketStatus sfUdpSocket_SendPacket(sfUdpSocket* socket, sfPacket* packet, sfIpAddress address, unsigned short port);
|
||||
CSFML_NETWORK_API sfSocketStatus sfUdpSocket_SendPacket(sfUdpSocket* socket, sfPacket* packet, sfIpAddress address, unsigned short port);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Receive a formatted packet of data from a remote peer with a UDP socket
|
||||
@@ -193,7 +193,7 @@ CSFML_API sfSocketStatus sfUdpSocket_SendPacket(sfUdpSocket* socket, sfPacket* p
|
||||
/// \return Status code
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfSocketStatus sfUdpSocket_ReceivePacket(sfUdpSocket* socket, sfPacket* packet, sfIpAddress* address, unsigned short* port);
|
||||
CSFML_NETWORK_API sfSocketStatus sfUdpSocket_ReceivePacket(sfUdpSocket* socket, sfPacket* packet, sfIpAddress* address, unsigned short* port);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Return the maximum number of bytes that can be
|
||||
@@ -202,7 +202,7 @@ CSFML_API sfSocketStatus sfUdpSocket_ReceivePacket(sfUdpSocket* socket, sfPacket
|
||||
/// \return The maximum size of a UDP datagram (message)
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API unsigned int sfUdpSocket_MaxDatagramSize();
|
||||
CSFML_NETWORK_API unsigned int sfUdpSocket_MaxDatagramSize();
|
||||
|
||||
|
||||
#endif // SFML_UDPSOCKET_H
|
||||
Reference in new issue
Block a user