Added Close() function to TCP and UDP sockets in CSFML

git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1256 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
LaurentGom 2009-10-31 19:23:19 +00:00
parent 472627f65f
commit 87b2d5a0d0
11 changed files with 46 additions and 0 deletions

View File

@ -68,6 +68,7 @@ EXPORTS
sfSocketTCP_Receive
sfSocketTCP_SendPacket
sfSocketTCP_ReceivePacket
sfSocketTCP_Close
sfSocketTCP_IsValid
sfSocketUDP_Create
sfSocketUDP_Destroy
@ -78,6 +79,7 @@ EXPORTS
sfSocketUDP_Receive
sfSocketUDP_SendPacket
sfSocketUDP_ReceivePacket
sfSocketUDP_Close
sfSocketUDP_IsValid
sfPacket_Create
sfPacket_Destroy

View File

@ -68,6 +68,7 @@ EXPORTS
sfSocketTCP_Receive
sfSocketTCP_SendPacket
sfSocketTCP_ReceivePacket
sfSocketTCP_Close
sfSocketTCP_IsValid
sfSocketUDP_Create
sfSocketUDP_Destroy
@ -78,6 +79,7 @@ EXPORTS
sfSocketUDP_Receive
sfSocketUDP_SendPacket
sfSocketUDP_ReceivePacket
sfSocketUDP_Close
sfSocketUDP_IsValid
sfPacket_Create
sfPacket_Destroy

View File

@ -68,6 +68,7 @@ EXPORTS
sfSocketTCP_Receive
sfSocketTCP_SendPacket
sfSocketTCP_ReceivePacket
sfSocketTCP_Close
sfSocketTCP_IsValid
sfSocketUDP_Create
sfSocketUDP_Destroy
@ -78,6 +79,7 @@ EXPORTS
sfSocketUDP_Receive
sfSocketUDP_SendPacket
sfSocketUDP_ReceivePacket
sfSocketUDP_Close
sfSocketUDP_IsValid
sfPacket_Create
sfPacket_Destroy

View File

@ -68,6 +68,7 @@ EXPORTS
sfSocketTCP_Receive
sfSocketTCP_SendPacket
sfSocketTCP_ReceivePacket
sfSocketTCP_Close
sfSocketTCP_IsValid
sfSocketUDP_Create
sfSocketUDP_Destroy
@ -78,6 +79,7 @@ EXPORTS
sfSocketUDP_Receive
sfSocketUDP_SendPacket
sfSocketUDP_ReceivePacket
sfSocketUDP_Close
sfSocketUDP_IsValid
sfPacket_Create
sfPacket_Destroy

View File

@ -145,6 +145,16 @@ CSFML_API sfSocketStatus sfSocketTCP_SendPacket(sfSocketTCP* socket, sfPacket* p
////////////////////////////////////////////////////////////
CSFML_API sfSocketStatus sfSocketTCP_ReceivePacket(sfSocketTCP* socket, sfPacket* packet);
////////////////////////////////////////////////////////////
/// Close the socket
///
/// \param socket : Socket to close
///
/// \return True if the socket was successfully closed
///
////////////////////////////////////////////////////////////
CSFML_API sfBool sfSocketTCP_Close(sfSocketTCP* socket);
////////////////////////////////////////////////////////////
/// Check if a socket is in a valid state ; this function
/// can be called any time to check if the socket is OK

View File

@ -140,6 +140,16 @@ CSFML_API sfSocketStatus sfSocketUDP_SendPacket(sfSocketUDP* socket, sfPacket* p
////////////////////////////////////////////////////////////
CSFML_API sfSocketStatus sfSocketUDP_ReceivePacket(sfSocketUDP* socket, sfPacket* packet, sfIPAddress* address, unsigned short* port);
////////////////////////////////////////////////////////////
/// Close the socket
///
/// \param socket : Socket to close
///
/// \return True if the socket was successfully closed
///
////////////////////////////////////////////////////////////
CSFML_API sfBool sfSocketUDP_Close(sfSocketUDP* socket);
////////////////////////////////////////////////////////////
/// Check if a socket is in a valid state ; this function
/// can be called any time to check if the socket is OK

View File

@ -170,6 +170,15 @@ sfSocketStatus sfSocketTCP_ReceivePacket(sfSocketTCP* socket, sfPacket* packet)
}
////////////////////////////////////////////////////////////
/// Close the socket
////////////////////////////////////////////////////////////
sfBool sfSocketTCP_Close(sfSocketTCP* socket)
{
CSFML_CALL_RETURN(socket, Close(), sfFalse);
}
////////////////////////////////////////////////////////////
/// Check if a socket is in a valid state ; this function
/// can be called any time to check if the socket is OK

View File

@ -165,6 +165,15 @@ sfSocketStatus sfSocketUDP_ReceivePacket(sfSocketUDP* socket, sfPacket* packet,
}
////////////////////////////////////////////////////////////
/// Close the socket
////////////////////////////////////////////////////////////
sfBool sfSocketUDP_Close(sfSocketUDP* socket)
{
CSFML_CALL_RETURN(socket, Close(), sfFalse);
}
////////////////////////////////////////////////////////////
/// Check if a socket is in a valid state ; this function
/// can be called any time to check if the socket is OK

Binary file not shown.

Binary file not shown.

Binary file not shown.