Moved client socket accepting into a separate thread object, cListenThread
MCServer can now listen on multiple ports FS #312 git-svn-id: http://mc-server.googlecode.com/svn/trunk@1252 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
@@ -535,3 +535,26 @@ AString & CreateHexDump(AString & a_Out, const void * a_Data, int a_Size, int a_
|
||||
|
||||
|
||||
|
||||
|
||||
AString Trim(const AString & a_Text)
|
||||
{
|
||||
if (a_Text.empty())
|
||||
{
|
||||
return "";
|
||||
}
|
||||
size_t Beginning = a_Text.find_first_not_of(" \r\n\t");
|
||||
if (Beginning == AString::npos)
|
||||
{
|
||||
Beginning = 0;
|
||||
}
|
||||
size_t End = a_Text.find_last_not_of(" \r\n\t");
|
||||
if (End == AString::npos)
|
||||
{
|
||||
End = a_Text.length();
|
||||
}
|
||||
return a_Text.substr(Beginning, End - Beginning + 1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user