Sockets can now handle properly the situation where the packet size is received in multiple chunks
git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/trunk@1433 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
parent
4a840d4f48
commit
786408c5bc
4 changed files with 36 additions and 19 deletions
|
@ -214,8 +214,10 @@ private :
|
|||
// Member data
|
||||
////////////////////////////////////////////////////////////
|
||||
SocketHelper::SocketType mySocket; ///< Socket descriptor
|
||||
std::vector<char> myPendingPacket; ///< Data of the current pending packet, if any (in non-blocking mode)
|
||||
Int32 myPendingPacketSize; ///< Size of the current pending packet, if any (in non-blocking mode)
|
||||
Uint32 myPendingHeader; ///< Data of the current pending packet header, if any
|
||||
Uint32 myPendingHeaderSize; ///< Size of the current pending packet header, if any
|
||||
std::vector<char> myPendingPacket; ///< Data of the current pending packet, if any
|
||||
Int32 myPendingPacketSize; ///< Size of the current pending packet, if any
|
||||
bool myIsBlocking; ///< Is the socket blocking or non-blocking ?
|
||||
};
|
||||
|
||||
|
|
|
@ -215,8 +215,10 @@ private :
|
|||
////////////////////////////////////////////////////////////
|
||||
SocketHelper::SocketType mySocket; ///< Socket identifier
|
||||
unsigned short myPort; ///< Port to which the socket is bound
|
||||
std::vector<char> myPendingPacket; ///< Data of the current pending packet, if any (in non-blocking mode)
|
||||
Int32 myPendingPacketSize; ///< Size of the current pending packet, if any (in non-blocking mode)
|
||||
Uint32 myPendingHeader; ///< Data of the current pending packet header, if any
|
||||
Uint32 myPendingHeaderSize; ///< Size of the current pending packet header, if any
|
||||
std::vector<char> myPendingPacket; ///< Data of the current pending packet, if any
|
||||
Int32 myPendingPacketSize; ///< Size of the current pending packet, if any
|
||||
bool myIsBlocking; ///< Is the socket blocking or non-blocking ?
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue