mirror of
https://github.com/SFML/SFML.git
synced 2025-02-08 01:18:02 +08:00
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:
parent
472627f65f
commit
87b2d5a0d0
@ -68,6 +68,7 @@ EXPORTS
|
|||||||
sfSocketTCP_Receive
|
sfSocketTCP_Receive
|
||||||
sfSocketTCP_SendPacket
|
sfSocketTCP_SendPacket
|
||||||
sfSocketTCP_ReceivePacket
|
sfSocketTCP_ReceivePacket
|
||||||
|
sfSocketTCP_Close
|
||||||
sfSocketTCP_IsValid
|
sfSocketTCP_IsValid
|
||||||
sfSocketUDP_Create
|
sfSocketUDP_Create
|
||||||
sfSocketUDP_Destroy
|
sfSocketUDP_Destroy
|
||||||
@ -78,6 +79,7 @@ EXPORTS
|
|||||||
sfSocketUDP_Receive
|
sfSocketUDP_Receive
|
||||||
sfSocketUDP_SendPacket
|
sfSocketUDP_SendPacket
|
||||||
sfSocketUDP_ReceivePacket
|
sfSocketUDP_ReceivePacket
|
||||||
|
sfSocketUDP_Close
|
||||||
sfSocketUDP_IsValid
|
sfSocketUDP_IsValid
|
||||||
sfPacket_Create
|
sfPacket_Create
|
||||||
sfPacket_Destroy
|
sfPacket_Destroy
|
||||||
|
@ -68,6 +68,7 @@ EXPORTS
|
|||||||
sfSocketTCP_Receive
|
sfSocketTCP_Receive
|
||||||
sfSocketTCP_SendPacket
|
sfSocketTCP_SendPacket
|
||||||
sfSocketTCP_ReceivePacket
|
sfSocketTCP_ReceivePacket
|
||||||
|
sfSocketTCP_Close
|
||||||
sfSocketTCP_IsValid
|
sfSocketTCP_IsValid
|
||||||
sfSocketUDP_Create
|
sfSocketUDP_Create
|
||||||
sfSocketUDP_Destroy
|
sfSocketUDP_Destroy
|
||||||
@ -78,6 +79,7 @@ EXPORTS
|
|||||||
sfSocketUDP_Receive
|
sfSocketUDP_Receive
|
||||||
sfSocketUDP_SendPacket
|
sfSocketUDP_SendPacket
|
||||||
sfSocketUDP_ReceivePacket
|
sfSocketUDP_ReceivePacket
|
||||||
|
sfSocketUDP_Close
|
||||||
sfSocketUDP_IsValid
|
sfSocketUDP_IsValid
|
||||||
sfPacket_Create
|
sfPacket_Create
|
||||||
sfPacket_Destroy
|
sfPacket_Destroy
|
||||||
|
@ -68,6 +68,7 @@ EXPORTS
|
|||||||
sfSocketTCP_Receive
|
sfSocketTCP_Receive
|
||||||
sfSocketTCP_SendPacket
|
sfSocketTCP_SendPacket
|
||||||
sfSocketTCP_ReceivePacket
|
sfSocketTCP_ReceivePacket
|
||||||
|
sfSocketTCP_Close
|
||||||
sfSocketTCP_IsValid
|
sfSocketTCP_IsValid
|
||||||
sfSocketUDP_Create
|
sfSocketUDP_Create
|
||||||
sfSocketUDP_Destroy
|
sfSocketUDP_Destroy
|
||||||
@ -78,6 +79,7 @@ EXPORTS
|
|||||||
sfSocketUDP_Receive
|
sfSocketUDP_Receive
|
||||||
sfSocketUDP_SendPacket
|
sfSocketUDP_SendPacket
|
||||||
sfSocketUDP_ReceivePacket
|
sfSocketUDP_ReceivePacket
|
||||||
|
sfSocketUDP_Close
|
||||||
sfSocketUDP_IsValid
|
sfSocketUDP_IsValid
|
||||||
sfPacket_Create
|
sfPacket_Create
|
||||||
sfPacket_Destroy
|
sfPacket_Destroy
|
||||||
|
@ -68,6 +68,7 @@ EXPORTS
|
|||||||
sfSocketTCP_Receive
|
sfSocketTCP_Receive
|
||||||
sfSocketTCP_SendPacket
|
sfSocketTCP_SendPacket
|
||||||
sfSocketTCP_ReceivePacket
|
sfSocketTCP_ReceivePacket
|
||||||
|
sfSocketTCP_Close
|
||||||
sfSocketTCP_IsValid
|
sfSocketTCP_IsValid
|
||||||
sfSocketUDP_Create
|
sfSocketUDP_Create
|
||||||
sfSocketUDP_Destroy
|
sfSocketUDP_Destroy
|
||||||
@ -78,6 +79,7 @@ EXPORTS
|
|||||||
sfSocketUDP_Receive
|
sfSocketUDP_Receive
|
||||||
sfSocketUDP_SendPacket
|
sfSocketUDP_SendPacket
|
||||||
sfSocketUDP_ReceivePacket
|
sfSocketUDP_ReceivePacket
|
||||||
|
sfSocketUDP_Close
|
||||||
sfSocketUDP_IsValid
|
sfSocketUDP_IsValid
|
||||||
sfPacket_Create
|
sfPacket_Create
|
||||||
sfPacket_Destroy
|
sfPacket_Destroy
|
||||||
|
@ -145,6 +145,16 @@ CSFML_API sfSocketStatus sfSocketTCP_SendPacket(sfSocketTCP* socket, sfPacket* p
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
CSFML_API sfSocketStatus sfSocketTCP_ReceivePacket(sfSocketTCP* socket, sfPacket* packet);
|
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
|
/// Check if a socket is in a valid state ; this function
|
||||||
/// can be called any time to check if the socket is OK
|
/// can be called any time to check if the socket is OK
|
||||||
|
@ -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);
|
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
|
/// Check if a socket is in a valid state ; this function
|
||||||
/// can be called any time to check if the socket is OK
|
/// can be called any time to check if the socket is OK
|
||||||
|
@ -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
|
/// Check if a socket is in a valid state ; this function
|
||||||
/// can be called any time to check if the socket is OK
|
/// can be called any time to check if the socket is OK
|
||||||
|
@ -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
|
/// Check if a socket is in a valid state ; this function
|
||||||
/// can be called any time to check if the socket is OK
|
/// can be called any time to check if the socket is OK
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user