mirror of
https://github.com/SFML/CSFML.git
synced 2026-10-26 13:06:13 +01:00
Updated to the new naming convention
This commit is contained in:
1 parent
9d0d0588b2
commit
36904a45d9
99 files changed
+2409
-2369
No files matched your search
+32
-32
@@ -119,7 +119,7 @@ enum sfFtpStatus
|
||||
/// \param ftpListingResponse Ftp listing response to destroy
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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_NETWORK_API void sfFtpListingResponse_Destroy(sfFtpListingResponse* ftpLis
|
||||
/// \return sfTrue if the status is a success, sfFalse if it is a failure
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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_NETWORK_API sfBool sfFtpListingResponse_IsOk(const sfFtpListingResponse* f
|
||||
/// \return Status code
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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_NETWORK_API sfFtpStatus sfFtpListingResponse_GetStatus(const sfFtpListingR
|
||||
/// \return The response message
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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_NETWORK_API const char* sfFtpListingResponse_GetMessage(const sfFtpListing
|
||||
/// \return Total number of filenames available
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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_NETWORK_API size_t sfFtpListingResponse_GetCount(const sfFtpListingRespons
|
||||
/// \return Array containing the requested filenames
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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_NETWORK_API const char* sfFtpListingResponse_GetFilename(const sfFtpListin
|
||||
/// \param ftpDirectoryResponse Ftp directory response to destroy
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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_NETWORK_API void sfFtpDirectoryResponse_Destroy(sfFtpDirectoryResponse* ft
|
||||
/// \return sfTrue if the status is a success, sfFalse if it is a failure
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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_NETWORK_API sfBool sfFtpDirectoryResponse_IsOk(const sfFtpDirectoryRespons
|
||||
/// \return Status code
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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_NETWORK_API sfFtpStatus sfFtpDirectoryResponse_GetStatus(const sfFtpDirect
|
||||
/// \return The response message
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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_NETWORK_API const char* sfFtpDirectoryResponse_GetMessage(const sfFtpDirec
|
||||
/// \return Directory name
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_API const char* sfFtpDirectoryResponse_GetDirectory(const sfFtpDirectoryResponse* ftpDirectoryResponse);
|
||||
CSFML_NETWORK_API const char* sfFtpDirectoryResponse_getDirectory(const sfFtpDirectoryResponse* ftpDirectoryResponse);
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
@@ -233,7 +233,7 @@ CSFML_NETWORK_API const char* sfFtpDirectoryResponse_GetDirectory(const sfFtpDir
|
||||
/// \param ftpResponse Ftp response to destroy
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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_NETWORK_API void sfFtpResponse_Destroy(sfFtpResponse* ftpResponse);
|
||||
/// \return sfTrue if the status is a success, sfFalse if it is a failure
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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_NETWORK_API sfBool sfFtpResponse_IsOk(const sfFtpResponse* ftpResponse);
|
||||
/// \return Status code
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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_NETWORK_API sfFtpStatus sfFtpResponse_GetStatus(const sfFtpResponse* ftpRe
|
||||
/// \return The response message
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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_NETWORK_API const char* sfFtpResponse_GetMessage(const sfFtpResponse* ftpR
|
||||
/// \return A new sfFtp object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_API sfFtp* sfFtp_Create(void);
|
||||
CSFML_NETWORK_API sfFtp* sfFtp_create(void);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Destroy a Ftp object
|
||||
@@ -282,7 +282,7 @@ CSFML_NETWORK_API sfFtp* sfFtp_Create(void);
|
||||
/// \param ftp Ftp object to destroy
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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_NETWORK_API void sfFtp_Destroy(sfFtp* ftp);
|
||||
/// \return Server response to the request
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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_NETWORK_API sfFtpResponse* sfFtp_Connect(sfFtp* ftp, sfIpAddress server, u
|
||||
/// \return Server response to the request
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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_NETWORK_API sfFtpResponse* sfFtp_LoginAnonymous(sfFtp* ftp);
|
||||
/// \return Server response to the request
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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_NETWORK_API sfFtpResponse* sfFtp_Login(sfFtp* ftp, const char* userName, c
|
||||
/// \return Server response to the request
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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_NETWORK_API sfFtpResponse* sfFtp_Disconnect(sfFtp* ftp);
|
||||
/// \return Server response to the request
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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_NETWORK_API sfFtpResponse* sfFtp_KeepAlive(sfFtp* ftp);
|
||||
/// \return Server response to the request
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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_NETWORK_API sfFtpDirectoryResponse* sfFtp_GetWorkingDirectory(sfFtp* ftp);
|
||||
/// \return Server response to the request
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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_NETWORK_API sfFtpListingResponse* sfFtp_GetDirectoryListing(sfFtp* ftp, co
|
||||
/// \return Server response to the request
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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_NETWORK_API sfFtpResponse* sfFtp_ChangeDirectory(sfFtp* ftp, const char* d
|
||||
/// \return Server response to the request
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_API sfFtpResponse* sfFtp_ParentDirectory(sfFtp* ftp);
|
||||
CSFML_NETWORK_API sfFtpResponse* sfFtp_parentDirectory(sfFtp* ftp);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Create a new directory
|
||||
@@ -421,7 +421,7 @@ CSFML_NETWORK_API sfFtpResponse* sfFtp_ParentDirectory(sfFtp* ftp);
|
||||
/// \return Server response to the request
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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_NETWORK_API sfFtpResponse* sfFtp_CreateDirectory(sfFtp* ftp, const char* n
|
||||
/// \return Server response to the request
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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_NETWORK_API sfFtpResponse* sfFtp_DeleteDirectory(sfFtp* ftp, const char* n
|
||||
/// \return Server response to the request
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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_NETWORK_API sfFtpResponse* sfFtp_RenameFile(sfFtp* ftp, const char* file,
|
||||
/// \return Server response to the request
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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_NETWORK_API sfFtpResponse* sfFtp_DeleteFile(sfFtp* ftp, const char* name);
|
||||
/// \return Server response to the request
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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_NETWORK_API sfFtpResponse* sfFtp_Download(sfFtp* ftp, const char* distantF
|
||||
/// \return Server response to the request
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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
|
||||
+17
-17
@@ -87,7 +87,7 @@ enum sfHttpStatus
|
||||
/// \return A new sfHttpRequest object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_API sfHttpRequest* sfHttpRequest_Create(void);
|
||||
CSFML_NETWORK_API sfHttpRequest* sfHttpRequest_create(void);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Destroy a HTTP request
|
||||
@@ -95,7 +95,7 @@ CSFML_NETWORK_API sfHttpRequest* sfHttpRequest_Create(void);
|
||||
/// \param httpRequest HTTP request to destroy
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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_NETWORK_API void sfHttpRequest_Destroy(sfHttpRequest* httpRequest);
|
||||
/// \param value Value of the field
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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_NETWORK_API void sfHttpRequest_SetField(sfHttpRequest* httpRequest, const
|
||||
/// \param method Method to use for the request
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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_NETWORK_API void sfHttpRequest_SetMethod(sfHttpRequest* httpRequest, sfHtt
|
||||
/// \param uri URI to request, relative to the host
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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_NETWORK_API void sfHttpRequest_SetUri(sfHttpRequest* httpRequest, const ch
|
||||
/// \param minor Minor HTTP version number
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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_NETWORK_API void sfHttpRequest_SetHttpVersion(sfHttpRequest* httpRequest,
|
||||
/// \param body Content of the body
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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_NETWORK_API void sfHttpRequest_SetBody(sfHttpRequest* httpRequest, const c
|
||||
/// \param httpResponse HTTP response to destroy
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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_NETWORK_API void sfHttpResponse_Destroy(sfHttpResponse* httpResponse);
|
||||
/// \return Value of the field, or empty string if not found
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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_NETWORK_API const char* sfHttpResponse_GetField(const sfHttpResponse* http
|
||||
/// \return Status code of the response
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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_NETWORK_API sfHttpStatus sfHttpResponse_GetStatus(const sfHttpResponse* ht
|
||||
/// \return Major HTTP version number
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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_NETWORK_API unsigned int sfHttpResponse_GetMajorVersion(const sfHttpRespon
|
||||
/// \return Minor HTTP version number
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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_NETWORK_API unsigned int sfHttpResponse_GetMinorVersion(const sfHttpRespon
|
||||
/// \return The response body
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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_NETWORK_API const char* sfHttpResponse_GetBody(const sfHttpResponse* httpR
|
||||
/// \return A new sfHttp object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_API sfHttp* sfHttp_Create(void);
|
||||
CSFML_NETWORK_API sfHttp* sfHttp_create(void);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Destroy a Http object
|
||||
@@ -252,7 +252,7 @@ CSFML_NETWORK_API sfHttp* sfHttp_Create(void);
|
||||
/// \param http Http object to destroy
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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_NETWORK_API void sfHttp_Destroy(sfHttp* http);
|
||||
/// \param port Port to use for connection
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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_NETWORK_API void sfHttp_SetHost(sfHttp* http, const char* host, unsigned s
|
||||
/// \return Server's response
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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
|
||||
@@ -38,10 +38,28 @@
|
||||
////////////////////////////////////////////////////////////
|
||||
typedef struct
|
||||
{
|
||||
char Address[16];
|
||||
char address[16];
|
||||
} sfIpAddress;
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Empty object that represents invalid addresses
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_API sfIpAddress sfIpAddress_None;
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Local host IP address (127.0.0.1, or "localhost")
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_API sfIpAddress sfIpAddress_LocalHost;
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief UDP broadcast address (255.255.255.255)
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_API sfIpAddress sfIpAddress_Broadcast;
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Create an address from a string
|
||||
///
|
||||
@@ -53,13 +71,13 @@ typedef struct
|
||||
/// \return Resulting address
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_API sfIpAddress sfIpAddress_FromString(const char* address);
|
||||
CSFML_NETWORK_API sfIpAddress sfIpAddress_fromString(const char* address);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Create an address from 4 bytes
|
||||
///
|
||||
/// Calling sfIpAddress_FromBytes(a, b, c, d) is equivalent
|
||||
/// to calling sfIpAddress_FromString("a.b.c.d"), but safer
|
||||
/// Calling sfIpAddress_fromBytes(a, b, c, d) is equivalent
|
||||
/// to calling sfIpAddress_fromString("a.b.c.d"), but safer
|
||||
/// as it doesn't have to parse a string to get the address
|
||||
/// components.
|
||||
///
|
||||
@@ -71,7 +89,7 @@ CSFML_NETWORK_API sfIpAddress sfIpAddress_FromString(const char* address);
|
||||
/// \return Resulting address
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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 +104,7 @@ CSFML_NETWORK_API sfIpAddress sfIpAddress_FromBytes(sfUint8 byte0, sfUint8 byte1
|
||||
/// \return Resulting address
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_API sfIpAddress sfIpAddress_FromInteger(sfUint32 address);
|
||||
CSFML_NETWORK_API sfIpAddress sfIpAddress_fromInteger(sfUint32 address);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get a string representation of an address
|
||||
@@ -100,7 +118,7 @@ CSFML_NETWORK_API sfIpAddress sfIpAddress_FromInteger(sfUint32 address);
|
||||
/// \return String representation of the address
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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 +134,7 @@ CSFML_NETWORK_API void sfIpAddress_ToString(sfIpAddress address, char* string);
|
||||
/// \return 32-bits unsigned integer representation of the address
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_API sfUint32 sfIpAddress_ToInteger(sfIpAddress address);
|
||||
CSFML_NETWORK_API sfUint32 sfIpAddress_toInteger(sfIpAddress address);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the computer's local address
|
||||
@@ -124,13 +142,13 @@ CSFML_NETWORK_API sfUint32 sfIpAddress_ToInteger(sfIpAddress address);
|
||||
/// The local address is the address of the computer from the
|
||||
/// LAN point of view, i.e. something like 192.168.1.56. It is
|
||||
/// meaningful only for communications over the local network.
|
||||
/// Unlike sfIpAddress_GetPublicAddress, this function is fast
|
||||
/// Unlike sfIpAddress_getPublicAddress, this function is fast
|
||||
/// and may be used safely anywhere.
|
||||
///
|
||||
/// \return Local IP address of the computer
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_API sfIpAddress sfIpAddress_GetLocalAddress(void);
|
||||
CSFML_NETWORK_API sfIpAddress sfIpAddress_getLocalAddress(void);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the computer's public address
|
||||
@@ -152,31 +170,7 @@ CSFML_NETWORK_API sfIpAddress sfIpAddress_GetLocalAddress(void);
|
||||
/// \return Public IP address of the computer
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_API sfIpAddress sfIpAddress_GetPublicAddress(sfTime timeout);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the empty/invalid address
|
||||
///
|
||||
/// \return Empty object that represents invalid addresses
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_API sfIpAddress sfIpAddress_None(void);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the computer's loopback address
|
||||
///
|
||||
/// \return Local host IP address (127.0.0.1, or "localhost")
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_API sfIpAddress sfIpAddress_LocalHost(void);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the UDP broadcast address
|
||||
///
|
||||
/// \return Broadcast IP address (255.255.255.255)
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_API sfIpAddress sfIpAddress_Broadcast(void);
|
||||
CSFML_NETWORK_API sfIpAddress sfIpAddress_getPublicAddress(sfTime timeout);
|
||||
|
||||
|
||||
#endif // SFML_IPADDRESS_H
|
||||
@@ -39,7 +39,7 @@
|
||||
/// \return A new sfPacket object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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_NETWORK_API sfPacket* sfPacket_Create(void);
|
||||
/// \return A new sfPacket object which is a copy of \a packet
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_API sfPacket* sfPacket_Copy(sfPacket* packet);
|
||||
CSFML_NETWORK_API sfPacket* sfPacket_copy(sfPacket* packet);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Destroy a packet
|
||||
@@ -57,7 +57,7 @@ CSFML_NETWORK_API sfPacket* sfPacket_Copy(sfPacket* packet);
|
||||
/// \param packet Packet to destroy
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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_NETWORK_API void sfPacket_Destroy(sfPacket* packet);
|
||||
/// \param sizeInBytes Number of bytes to append
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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_NETWORK_API void sfPacket_Append(sfPacket* packet, const void* data, size_
|
||||
/// \param packet Packet object
|
||||
///
|
||||
///////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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,20 +92,20 @@ CSFML_NETWORK_API void sfPacket_Clear(sfPacket* packet);
|
||||
/// \return Pointer to the data
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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
|
||||
///
|
||||
/// This function returns the number of bytes pointed to by
|
||||
/// what sfPacket_GetData returns.
|
||||
/// what sfPacket_getData returns.
|
||||
///
|
||||
/// \param packet Packet object
|
||||
///
|
||||
/// \return Data size, in bytes
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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_NETWORK_API size_t sfPacket_GetDataSize(const sfPacket* packet);
|
||||
/// \return sfTrue if all data was read, sfFalse otherwise
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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_NETWORK_API sfBool sfPacket_EndOfPacket(const sfPacket* packet);
|
||||
/// \return sfTrue if last data extraction from packet was successful
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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_NETWORK_API sfBool sfPacket_CanRead(const sfPacket* packet);
|
||||
/// \param packet Packet object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
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);
|
||||
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_NETWORK_API void sfPacket_ReadWideString(sfPacket* packet, wchar_t* st
|
||||
/// \param packet Packet object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
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);
|
||||
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
|
||||
@@ -39,7 +39,7 @@
|
||||
/// \return A new sfSocketSelector object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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_NETWORK_API sfSocketSelector* sfSocketSelector_Create(void);
|
||||
/// \return A new sfSocketSelector object which is a copy of \a selector
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_API sfSocketSelector* sfSocketSelector_Copy(sfSocketSelector* selector);
|
||||
CSFML_NETWORK_API sfSocketSelector* sfSocketSelector_copy(sfSocketSelector* selector);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Destroy a socket selector
|
||||
@@ -57,7 +57,7 @@ CSFML_NETWORK_API sfSocketSelector* sfSocketSelector_Copy(sfSocketSelector* sele
|
||||
/// \param selector Socket selector to destroy
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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_NETWORK_API void sfSocketSelector_Destroy(sfSocketSelector* selector);
|
||||
/// \param socket Pointer to the socket to add
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
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);
|
||||
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_NETWORK_API void sfSocketSelector_AddUdpSocket(sfSocketSelector* selector,
|
||||
/// \param socket POointer to the socket to remove
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
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);
|
||||
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,14 +98,14 @@ CSFML_NETWORK_API void sfSocketSelector_RemoveUdpSocket(sfSocketSelector* select
|
||||
/// \param selector Socket selector object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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
|
||||
///
|
||||
/// This function returns as soon as at least one socket has
|
||||
/// some data available to be received. To know which sockets are
|
||||
/// ready, use the sfSocketSelector_IsXxxReady functions.
|
||||
/// ready, use the sfSocketSelector_isXxxReady functions.
|
||||
/// If you use a timeout and no socket is ready before the timeout
|
||||
/// is over, the function returns sfFalse.
|
||||
///
|
||||
@@ -115,7 +115,7 @@ CSFML_NETWORK_API void sfSocketSelector_Clear(sfSocketSelector* selector);
|
||||
/// \return sfTrue if there are sockets ready, sfFalse otherwise
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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_NETWORK_API sfBool sfSocketSelector_Wait(sfSocketSelector* selector, sfTim
|
||||
/// \return sfTrue if the socket is ready to read, sfFalse otherwise
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
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);
|
||||
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
|
||||
@@ -39,7 +39,7 @@
|
||||
/// \return A new sfTcpListener object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_API sfTcpListener* sfTcpListener_Create(void);
|
||||
CSFML_NETWORK_API sfTcpListener* sfTcpListener_create(void);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Destroy a TCP listener
|
||||
@@ -47,7 +47,7 @@ CSFML_NETWORK_API sfTcpListener* sfTcpListener_Create(void);
|
||||
/// \param listener TCP listener to destroy
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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_NETWORK_API void sfTcpListener_Destroy(sfTcpListener* listener);
|
||||
/// \param blocking sfTrue to set the socket as blocking, sfFalse for non-blocking
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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_NETWORK_API void sfTcpListener_SetBlocking(sfTcpListener* listener, sfBool
|
||||
/// \return sfTrue if the socket is blocking, sfFalse otherwise
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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_NETWORK_API sfBool sfTcpListener_IsBlocking(const sfTcpListener* listener)
|
||||
/// \return Port to which the TCP listener is bound
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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_NETWORK_API unsigned short sfTcpListener_GetLocalPort(const sfTcpListener*
|
||||
/// \return Status code
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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_NETWORK_API sfSocketStatus sfTcpListener_Listen(sfTcpListener* listener, u
|
||||
/// \return Status code
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_API sfSocketStatus sfTcpListener_Accept(sfTcpListener* listener, sfTcpSocket** connected);
|
||||
CSFML_NETWORK_API sfSocketStatus sfTcpListener_accept(sfTcpListener* listener, sfTcpSocket** connected);
|
||||
|
||||
|
||||
#endif // SFML_TCPLISTENER_H
|
||||
@@ -42,7 +42,7 @@
|
||||
/// \return A new sfTcpSocket object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_API sfTcpSocket* sfTcpSocket_Create(void);
|
||||
CSFML_NETWORK_API sfTcpSocket* sfTcpSocket_create(void);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Destroy a TCP socket
|
||||
@@ -50,14 +50,14 @@ CSFML_NETWORK_API sfTcpSocket* sfTcpSocket_Create(void);
|
||||
/// \param socket TCP socket to destroy
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_API void sfTcpSocket_Destroy(sfTcpSocket* socket);
|
||||
CSFML_NETWORK_API void sfTcpSocket_destroy(sfTcpSocket* socket);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the blocking state of a TCP listener
|
||||
///
|
||||
/// In blocking mode, calls will not return until they have
|
||||
/// completed their task. For example, a call to
|
||||
/// sfTcpSocket_Receive in blocking mode won't return until
|
||||
/// sfTcpSocket_receive in blocking mode won't return until
|
||||
/// new data was actually received.
|
||||
/// In non-blocking mode, calls will always return immediately,
|
||||
/// using the return code to signal whether there was data
|
||||
@@ -68,7 +68,7 @@ CSFML_NETWORK_API void sfTcpSocket_Destroy(sfTcpSocket* socket);
|
||||
/// \param blocking sfTrue to set the socket as blocking, sfFalse for non-blocking
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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_NETWORK_API void sfTcpSocket_SetBlocking(sfTcpSocket* socket, sfBool block
|
||||
/// \return sfTrue if the socket is blocking, sfFalse otherwise
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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,20 +90,20 @@ CSFML_NETWORK_API sfBool sfTcpSocket_IsBlocking(const sfTcpSocket* socket);
|
||||
/// \return Port to which the socket is bound
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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
|
||||
///
|
||||
/// It the socket is not connected, this function returns
|
||||
/// sfIpAddress_None().
|
||||
/// sfIpAddress_None.
|
||||
///
|
||||
/// \param socket TCP socket object
|
||||
///
|
||||
/// \return Address of the remote peer
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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_NETWORK_API sfIpAddress sfTcpSocket_GetRemoteAddress(const sfTcpSocket* so
|
||||
/// \return Remote port to which the socket is connected
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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_NETWORK_API unsigned short sfTcpSocket_GetRemotePort(const sfTcpSocket* so
|
||||
/// \return Status code
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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_NETWORK_API sfSocketStatus sfTcpSocket_Connect(sfTcpSocket* socket, sfIpAd
|
||||
/// \param socket TCP socket object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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_NETWORK_API void sfTcpSocket_Disconnect(sfTcpSocket* socket);
|
||||
/// \return Status code
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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_NETWORK_API sfSocketStatus sfTcpSocket_Send(sfTcpSocket* socket, const cha
|
||||
/// \return Status code
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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_NETWORK_API sfSocketStatus sfTcpSocket_Receive(sfTcpSocket* socket, char*
|
||||
/// \return Status code
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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_NETWORK_API sfSocketStatus sfTcpSocket_SendPacket(sfTcpSocket* socket, sfP
|
||||
/// \return Status code
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_API sfSocketStatus sfTcpSocket_ReceivePacket(sfTcpSocket* socket, sfPacket* packet);
|
||||
CSFML_NETWORK_API sfSocketStatus sfTcpSocket_receivePacket(sfTcpSocket* socket, sfPacket* packet);
|
||||
|
||||
|
||||
#endif // SFML_TCPSOCKET_H
|
||||
@@ -41,7 +41,7 @@
|
||||
/// \return A new sfUdpSocket object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_API sfUdpSocket* sfUdpSocket_Create(void);
|
||||
CSFML_NETWORK_API sfUdpSocket* sfUdpSocket_create(void);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Destroy a UDP socket
|
||||
@@ -49,14 +49,14 @@ CSFML_NETWORK_API sfUdpSocket* sfUdpSocket_Create(void);
|
||||
/// \param socket UDP socket to destroy
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_API void sfUdpSocket_Destroy(sfUdpSocket* socket);
|
||||
CSFML_NETWORK_API void sfUdpSocket_destroy(sfUdpSocket* socket);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the blocking state of a UDP listener
|
||||
///
|
||||
/// In blocking mode, calls will not return until they have
|
||||
/// completed their task. For example, a call to
|
||||
/// sfUDPSocket_Receive in blocking mode won't return until
|
||||
/// sfUDPSocket_receive in blocking mode won't return until
|
||||
/// new data was actually received.
|
||||
/// In non-blocking mode, calls will always return immediately,
|
||||
/// using the return code to signal whether there was data
|
||||
@@ -67,7 +67,7 @@ CSFML_NETWORK_API void sfUdpSocket_Destroy(sfUdpSocket* socket);
|
||||
/// \param blocking sfTrue to set the socket as blocking, sfFalse for non-blocking
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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_NETWORK_API void sfUdpSocket_SetBlocking(sfUdpSocket* socket, sfBool block
|
||||
/// \return sfTrue if the socket is blocking, sfFalse otherwise
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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_NETWORK_API sfBool sfUdpSocket_IsBlocking(const sfUdpSocket* socket);
|
||||
/// \return Port to which the socket is bound
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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
|
||||
@@ -99,7 +99,7 @@ CSFML_NETWORK_API unsigned short sfUdpSocket_GetLocalPort(const sfUdpSocket* soc
|
||||
/// able to receive data on that port.
|
||||
/// You can use the special value 0 to tell the
|
||||
/// system to automatically pick an available port, and then
|
||||
/// call sfUdpSocket_GetLocalPort to retrieve the chosen port.
|
||||
/// call sfUdpSocket_getLocalPort to retrieve the chosen port.
|
||||
///
|
||||
/// \param socket UDP socket object
|
||||
/// \param port Port to bind the socket to
|
||||
@@ -107,7 +107,7 @@ CSFML_NETWORK_API unsigned short sfUdpSocket_GetLocalPort(const sfUdpSocket* soc
|
||||
/// \return Status code
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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
|
||||
@@ -125,7 +125,7 @@ CSFML_NETWORK_API void sfUdpSocket_Unbind(sfUdpSocket* socket);
|
||||
/// \brief Send raw data to a remote peer with a UDP socket
|
||||
///
|
||||
/// Make sure that \a size is not greater than
|
||||
/// sfUdpSocket_MaxDatagramSize(), otherwise this function will
|
||||
/// sfUdpSocket_maxDatagramSize(), otherwise this function will
|
||||
/// fail and no data will be sent.
|
||||
///
|
||||
/// \param socket UDP socket object
|
||||
@@ -137,7 +137,7 @@ CSFML_NETWORK_API void sfUdpSocket_Unbind(sfUdpSocket* socket);
|
||||
/// \return Status code
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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,13 +159,13 @@ CSFML_NETWORK_API sfSocketStatus sfUdpSocket_Send(sfUdpSocket* socket, const cha
|
||||
/// \return Status code
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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
|
||||
///
|
||||
/// Make sure that the packet size is not greater than
|
||||
/// sfUdpSocket_MaxDatagramSize(), otherwise this function will
|
||||
/// sfUdpSocket_maxDatagramSize(), otherwise this function will
|
||||
/// fail and no data will be sent.
|
||||
///
|
||||
/// \param socket UDP socket object
|
||||
@@ -176,15 +176,13 @@ CSFML_NETWORK_API sfSocketStatus sfUdpSocket_Receive(sfUdpSocket* socket, char*
|
||||
/// \return Status code
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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
|
||||
///
|
||||
/// In blocking mode, this function will wait until the whole packet
|
||||
/// has been received.
|
||||
/// Warning: this functon doesn't properly handle mixed data
|
||||
/// received from multiple peers.
|
||||
///
|
||||
/// \param packet Packet to fill with the received data
|
||||
/// \param remoteAddress Address of the peer that sent the data
|
||||
@@ -193,7 +191,7 @@ CSFML_NETWORK_API sfSocketStatus sfUdpSocket_SendPacket(sfUdpSocket* socket, sfP
|
||||
/// \return Status code
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_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 +200,7 @@ CSFML_NETWORK_API sfSocketStatus sfUdpSocket_ReceivePacket(sfUdpSocket* socket,
|
||||
/// \return The maximum size of a UDP datagram (message)
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_API unsigned int sfUdpSocket_MaxDatagramSize();
|
||||
CSFML_NETWORK_API unsigned int sfUdpSocket_maxDatagramSize();
|
||||
|
||||
|
||||
#endif // SFML_UDPSOCKET_H
|
||||
Reference in new issue
Block a user