Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Return type of MediaWiki\Session\PHPSessionHandler::open($save_path, $session_name) should either be compatible with SessionHandlerInterface::open(string $path, string $name): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/cppe.ru/www/includes/session/PHPSessionHandler.php on line 199

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Return type of MediaWiki\Session\PHPSessionHandler::close() should either be compatible with SessionHandlerInterface::close(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/cppe.ru/www/includes/session/PHPSessionHandler.php on line 214

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Return type of MediaWiki\Session\PHPSessionHandler::read($id) should either be compatible with SessionHandlerInterface::read(string $id): string|false, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/cppe.ru/www/includes/session/PHPSessionHandler.php on line 228

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Return type of MediaWiki\Session\PHPSessionHandler::write($id, $dataStr) should either be compatible with SessionHandlerInterface::write(string $id, string $data): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/cppe.ru/www/includes/session/PHPSessionHandler.php on line 256

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Return type of MediaWiki\Session\PHPSessionHandler::destroy($id) should either be compatible with SessionHandlerInterface::destroy(string $id): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/cppe.ru/www/includes/session/PHPSessionHandler.php on line 362

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Return type of MediaWiki\Session\PHPSessionHandler::gc($maxlifetime) should either be compatible with SessionHandlerInterface::gc(int $max_lifetime): int|false, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/cppe.ru/www/includes/session/PHPSessionHandler.php on line 383

Warning: ini_set(): Session ini settings cannot be changed after headers have already been sent in /var/www/cppe.ru/www/includes/session/PHPSessionHandler.php on line 126

Warning: ini_set(): Session ini settings cannot be changed after headers have already been sent in /var/www/cppe.ru/www/includes/session/PHPSessionHandler.php on line 127

Warning: session_cache_limiter(): Session cache limiter cannot be changed after headers have already been sent in /var/www/cppe.ru/www/includes/session/PHPSessionHandler.php on line 133

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Warning: session_set_save_handler(): Session save handler cannot be changed after headers have already been sent in /var/www/cppe.ru/www/includes/session/PHPSessionHandler.php on line 140

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Return type of Wikimedia\Rdbms\IResultWrapper::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/cppe.ru/www/includes/libs/rdbms/database/resultwrapper/IResultWrapper.php on line 70

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Return type of Wikimedia\Rdbms\IResultWrapper::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/cppe.ru/www/includes/libs/rdbms/database/resultwrapper/IResultWrapper.php on line 80

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Return type of Wikimedia\Rdbms\IResultWrapper::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/cppe.ru/www/includes/libs/rdbms/database/resultwrapper/IResultWrapper.php on line 75

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Return type of Wikimedia\Rdbms\ResultWrapper::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/cppe.ru/www/includes/libs/rdbms/database/resultwrapper/ResultWrapper.php on line 117

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Return type of Wikimedia\Rdbms\ResultWrapper::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/cppe.ru/www/includes/libs/rdbms/database/resultwrapper/ResultWrapper.php on line 90

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Return type of MediaWiki\Session\Session::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/cppe.ru/www/includes/session/Session.php on line 624

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Return type of MediaWiki\Session\Session::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/cppe.ru/www/includes/session/Session.php on line 629

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Return type of MediaWiki\Session\Session::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/cppe.ru/www/includes/session/Session.php on line 639

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Return type of MediaWiki\Session\Session::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/cppe.ru/www/includes/session/Session.php on line 634

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Return type of MediaWiki\Session\Session::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/cppe.ru/www/includes/session/Session.php on line 649

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Return type of MediaWiki\Session\Session::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/cppe.ru/www/includes/session/Session.php on line 644

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Return type of MediaWiki\Session\Session::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/cppe.ru/www/includes/session/Session.php on line 659

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Return type of & MediaWiki\Session\Session::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/cppe.ru/www/includes/session/Session.php on line 672

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Return type of MediaWiki\Session\Session::offsetSet($offset, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/cppe.ru/www/includes/session/Session.php on line 681

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Return type of MediaWiki\Session\Session::offsetUnset($offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/cppe.ru/www/includes/session/Session.php on line 685

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Message implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in /var/www/cppe.ru/www/includes/Message.php on line 159

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: RawMessage implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in /var/www/cppe.ru/www/includes/RawMessage.php on line 34

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Creation of dynamic property RequestContext::$recursion is deprecated in /var/www/cppe.ru/www/includes/context/RequestContext.php on line 354

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Creation of dynamic property Parser::$mPreprocessorClass is deprecated in /var/www/cppe.ru/www/includes/parser/Parser.php on line 280

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Creation of dynamic property PPDStack::$accum is deprecated in /var/www/cppe.ru/www/includes/parser/Preprocessor_DOM.php on line 803

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Warning: Cannot modify header information - headers already sent by (output started at /var/www/cppe.ru/www/includes/session/PHPSessionHandler.php:34) in /var/www/cppe.ru/www/includes/Feed.php on line 232

Warning: Cannot modify header information - headers already sent by (output started at /var/www/cppe.ru/www/includes/session/PHPSessionHandler.php:34) in /var/www/cppe.ru/www/includes/Feed.php on line 237

Warning: Cannot modify header information - headers already sent by (output started at /var/www/cppe.ru/www/includes/session/PHPSessionHandler.php:34) in /var/www/cppe.ru/www/includes/WebResponse.php on line 46

Warning: Cannot modify header information - headers already sent by (output started at /var/www/cppe.ru/www/includes/session/PHPSessionHandler.php:34) in /var/www/cppe.ru/www/includes/WebResponse.php on line 46

Warning: Cannot modify header information - headers already sent by (output started at /var/www/cppe.ru/www/includes/session/PHPSessionHandler.php:34) in /var/www/cppe.ru/www/includes/WebResponse.php on line 46

Warning: Cannot modify header information - headers already sent by (output started at /var/www/cppe.ru/www/includes/session/PHPSessionHandler.php:34) in /var/www/cppe.ru/www/includes/WebResponse.php on line 46

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48
http://cppe.ru/index.php?action=history&feed=atom&title=C%2B%2B%2FQt%2FQTcpServer
C++/Qt/QTcpServer - История изменений 2026-11-08T04:25:44Z История изменений этой страницы в вики MediaWiki 1.30.0
Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Creation of dynamic property WikitextContent::$mText is deprecated in /var/www/cppe.ru/www/includes/content/TextContent.php on line 56

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Creation of dynamic property WikitextContent::$mText is deprecated in /var/www/cppe.ru/www/includes/content/TextContent.php on line 56

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Creation of dynamic property PoolCounterWorkViaCallback::$poolCounter is deprecated in /var/www/cppe.ru/www/includes/poolcounter/PoolCounterWork.php on line 39

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Creation of dynamic property PPDStack::$accum is deprecated in /var/www/cppe.ru/www/includes/parser/Preprocessor_DOM.php on line 803

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Creation of dynamic property PPDStack::$accum is deprecated in /var/www/cppe.ru/www/includes/parser/Preprocessor_DOM.php on line 803

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Creation of dynamic property BlockLevelPass::$lineStart is deprecated in /var/www/cppe.ru/www/includes/parser/BlockLevelPass.php on line 60

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48
http://cppe.ru/index.php?title=C%2B%2B/Qt/QTcpServer&diff=1210&oldid=prev
в 14:21, 25 мая 2010 2010-05-25T14:21:06Z <p></p> <table class="diff diff-contentalign-left" data-mw="interface"> <tr style="vertical-align: top;" lang="ru"> <td colspan="1" style="background-color: white; color:black; text-align: center;">← Предыдущая</td> <td colspan="1" style="background-color: white; color:black; text-align: center;">Версия 14:21, 25 мая 2010</td> </tr><tr><td colspan="2" style="text-align: center;" lang="ru"><div class="mw-diff-empty">(нет различий)</div> </td></tr></table>

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Creation of dynamic property WikitextContent::$mText is deprecated in /var/www/cppe.ru/www/includes/content/TextContent.php on line 56

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48
http://cppe.ru/index.php?title=C%2B%2B/Qt/QTcpServer&diff=1211&oldid=prev
Admin: 1 версия:&#32;Импорт контента... 2010-05-25T10:25:09Z <p>1 версия: Импорт контента...</p> <p><b>Новая страница</b></p><div>==Loopback QTcpServer and QTcpSocket==<br /> <br /> <br /> <br /> &lt;source lang=&quot;cpp&quot;&gt; <br /> /****************************************************************************<br /> **<br /> ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).<br /> ** All rights reserved.<br /> ** Contact: Nokia Corporation (qt-info@nokia.com)<br /> **<br /> ** This file is part of the examples of the Qt Toolkit.<br /> **<br /> ** $QT_BEGIN_LICENSE:LGPL$<br /> ** Commercial Usage<br /> ** Licensees holding valid Qt Commercial licenses may use this file in<br /> ** accordance with the Qt Commercial License Agreement provided with the<br /> ** Software or, alternatively, in accordance with the terms contained in<br /> ** a written agreement between you and Nokia.<br /> **<br /> ** GNU Lesser General Public License Usage<br /> ** Alternatively, this file may be used under the terms of the GNU Lesser<br /> ** General Public License version 2.1 as published by the Free Software<br /> ** Foundation and appearing in the file LICENSE.LGPL included in the<br /> ** packaging of this file. Please review the following information to<br /> ** ensure the GNU Lesser General Public License version 2.1 requirements<br /> ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.<br /> **<br /> ** In addition, as a special exception, Nokia gives you certain additional<br /> ** rights. These rights are described in the Nokia Qt LGPL Exception<br /> ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.<br /> **<br /> ** GNU General Public License Usage<br /> ** Alternatively, this file may be used under the terms of the GNU<br /> ** General Public License version 3.0 as published by the Free Software<br /> ** Foundation and appearing in the file LICENSE.GPL included in the<br /> ** packaging of this file. Please review the following information to<br /> ** ensure the GNU General Public License version 3.0 requirements will be<br /> ** met: http://www.gnu.org/copyleft/gpl.html.<br /> **<br /> ** If you have questions regarding the use of this file, please contact<br /> ** Nokia at qt-info@nokia.com.<br /> ** $QT_END_LICENSE$<br /> **<br /> ****************************************************************************/<br /> #ifndef DIALOG_H<br /> #define DIALOG_H<br /> #include &lt;QDialog&gt;<br /> #include &lt;QTcpServer&gt;<br /> #include &lt;QTcpSocket&gt;<br /> QT_BEGIN_NAMESPACE<br /> class QDialogButtonBox;<br /> class QLabel;<br /> class QProgressBar;<br /> class QPushButton;<br /> class QTcpServer;<br /> class QTcpSocket;<br /> QT_END_NAMESPACE<br /> class Dialog : public QDialog<br /> {<br /> Q_OBJECT<br /> public:<br /> Dialog(QWidget *parent = 0);<br /> public slots:<br /> void start();<br /> void acceptConnection();<br /> void startTransfer();<br /> void updateServerProgress();<br /> void updateClientProgress(qint64 numBytes);<br /> void displayError(QAbstractSocket::SocketError socketError);<br /> private:<br /> QProgressBar *clientProgressBar;<br /> QProgressBar *serverProgressBar;<br /> QLabel *clientStatusLabel;<br /> QLabel *serverStatusLabel;<br /> QPushButton *startButton;<br /> QPushButton *quitButton;<br /> QDialogButtonBox *buttonBox;<br /> QTcpServer tcpServer;<br /> QTcpSocket tcpClient;<br /> QTcpSocket *tcpServerConnection;<br /> int bytesToWrite;<br /> int bytesWritten;<br /> int bytesReceived;<br /> };<br /> #endif<br /> <br /> <br /> #include &lt;QtGui&gt;<br /> #include &lt;QtNetwork&gt;<br /> #include &quot;dialog.h&quot;<br /> #if !defined(Q_OS_WINCE)<br /> static const int TotalBytes = 50 * 1024 * 1024;<br /> #else<br /> static const int TotalBytes = 5 * 1024 * 1024;<br /> #endif<br /> static const int PayloadSize = 65536;<br /> Dialog::Dialog(QWidget *parent)<br /> : QDialog(parent)<br /> {<br /> clientProgressBar = new QProgressBar;<br /> clientStatusLabel = new QLabel(tr(&quot;Client ready&quot;));<br /> serverProgressBar = new QProgressBar;<br /> serverStatusLabel = new QLabel(tr(&quot;Server ready&quot;));<br /> startButton = new QPushButton(tr(&quot;&amp;Start&quot;));<br /> quitButton = new QPushButton(tr(&quot;&amp;Quit&quot;));<br /> buttonBox = new QDialogButtonBox;<br /> buttonBox-&gt;addButton(startButton, QDialogButtonBox::ActionRole);<br /> buttonBox-&gt;addButton(quitButton, QDialogButtonBox::RejectRole);<br /> connect(startButton, SIGNAL(clicked()), this, SLOT(start()));<br /> connect(quitButton, SIGNAL(clicked()), this, SLOT(close()));<br /> connect(&amp;tcpServer, SIGNAL(newConnection()),<br /> this, SLOT(acceptConnection()));<br /> connect(&amp;tcpClient, SIGNAL(connected()), this, SLOT(startTransfer()));<br /> connect(&amp;tcpClient, SIGNAL(bytesWritten(qint64)),<br /> this, SLOT(updateClientProgress(qint64)));<br /> connect(&amp;tcpClient, SIGNAL(error(QAbstractSocket::SocketError)),<br /> this, SLOT(displayError(QAbstractSocket::SocketError)));<br /> QVBoxLayout *mainLayout = new QVBoxLayout;<br /> mainLayout-&gt;addWidget(clientProgressBar);<br /> mainLayout-&gt;addWidget(clientStatusLabel);<br /> mainLayout-&gt;addWidget(serverProgressBar);<br /> mainLayout-&gt;addWidget(serverStatusLabel);<br /> mainLayout-&gt;addStretch(1);<br /> mainLayout-&gt;addSpacing(10);<br /> mainLayout-&gt;addWidget(buttonBox);<br /> setLayout(mainLayout);<br /> setWindowTitle(tr(&quot;Loopback&quot;));<br /> }<br /> void Dialog::start()<br /> {<br /> startButton-&gt;setEnabled(false);<br /> #ifndef QT_NO_CURSOR<br /> QApplication::setOverrideCursor(Qt::WaitCursor);<br /> #endif<br /> bytesWritten = 0;<br /> bytesReceived = 0;<br /> while (!tcpServer.isListening() &amp;&amp; !tcpServer.listen()) {<br /> QMessageBox::StandardButton ret = QMessageBox::critical(this,<br /> tr(&quot;Loopback&quot;),<br /> tr(&quot;Unable to start the test: %1.&quot;)<br /> .arg(tcpServer.errorString()),<br /> QMessageBox::Retry<br /> | QMessageBox::Cancel);<br /> if (ret == QMessageBox::Cancel)<br /> return;<br /> }<br /> serverStatusLabel-&gt;setText(tr(&quot;Listening&quot;));<br /> clientStatusLabel-&gt;setText(tr(&quot;Connecting&quot;));<br /> tcpClient.connectToHost(QHostAddress::LocalHost, tcpServer.serverPort());<br /> }<br /> void Dialog::acceptConnection()<br /> {<br /> tcpServerConnection = tcpServer.nextPendingConnection();<br /> connect(tcpServerConnection, SIGNAL(readyRead()),<br /> this, SLOT(updateServerProgress()));<br /> connect(tcpServerConnection, SIGNAL(error(QAbstractSocket::SocketError)),<br /> this, SLOT(displayError(QAbstractSocket::SocketError)));<br /> serverStatusLabel-&gt;setText(tr(&quot;Accepted connection&quot;));<br /> tcpServer.close();<br /> }<br /> void Dialog::startTransfer()<br /> {<br /> bytesToWrite = TotalBytes - (int)tcpClient.write(QByteArray(PayloadSize, &quot;@&quot;));<br /> clientStatusLabel-&gt;setText(tr(&quot;Connected&quot;));<br /> }<br /> void Dialog::updateServerProgress()<br /> {<br /> bytesReceived += (int)tcpServerConnection-&gt;bytesAvailable();<br /> tcpServerConnection-&gt;readAll();<br /> serverProgressBar-&gt;setMaximum(TotalBytes);<br /> serverProgressBar-&gt;setValue(bytesReceived);<br /> serverStatusLabel-&gt;setText(tr(&quot;Received %1MB&quot;)<br /> .arg(bytesReceived / (1024 * 1024)));<br /> if (bytesReceived == TotalBytes) {<br /> tcpServerConnection-&gt;close();<br /> startButton-&gt;setEnabled(true);<br /> #ifndef QT_NO_CURSOR<br /> QApplication::restoreOverrideCursor();<br /> #endif<br /> }<br /> }<br /> void Dialog::updateClientProgress(qint64 numBytes)<br /> {<br /> bytesWritten += (int)numBytes;<br /> if (bytesToWrite &gt; 0)<br /> bytesToWrite -= (int)tcpClient.write(QByteArray(qMin(bytesToWrite, PayloadSize), &quot;@&quot;));<br /> clientProgressBar-&gt;setMaximum(TotalBytes);<br /> clientProgressBar-&gt;setValue(bytesWritten);<br /> clientStatusLabel-&gt;setText(tr(&quot;Sent %1MB&quot;)<br /> .arg(bytesWritten / (1024 * 1024)));<br /> }<br /> void Dialog::displayError(QAbstractSocket::SocketError socketError)<br /> {<br /> if (socketError == QTcpSocket::RemoteHostClosedError)<br /> return;<br /> QMessageBox::information(this, tr(&quot;Network error&quot;),<br /> tr(&quot;The following error occurred: %1.&quot;)<br /> .arg(tcpClient.errorString()));<br /> tcpClient.close();<br /> tcpServer.close();<br /> clientProgressBar-&gt;reset();<br /> serverProgressBar-&gt;reset();<br /> clientStatusLabel-&gt;setText(tr(&quot;Client ready&quot;));<br /> serverStatusLabel-&gt;setText(tr(&quot;Server ready&quot;));<br /> startButton-&gt;setEnabled(true);<br /> #ifndef QT_NO_CURSOR<br /> QApplication::restoreOverrideCursor();<br /> #endif<br /> }<br /> <br /> <br /> #include &lt;QApplication&gt;<br /> #include &quot;dialog.h&quot;<br /> int main(int argc, char *argv[])<br /> {<br /> QApplication app(argc, argv);<br /> Dialog dialog;<br /> dialog.show();<br /> return dialog.exec();<br /> }<br /> <br /> <br /> &lt;/source&gt;<br /> <br /> <br /> ==QTcpServer based server==<br /> <br /> <br /> <br /> &lt;source lang=&quot;cpp&quot;&gt; <br /> <br /> Foundations of Qt Development\Chapter14\tcpserver\main.cpp<br /> /*<br /> * Copyright (c) 2006-2007, Johan Thelin<br /> * <br /> * All rights reserved.<br /> * <br /> * Redistribution and use in source and binary forms, with or without modification, <br /> * are permitted provided that the following conditions are met:<br /> * <br /> * * Redistributions of source code must retain the above copyright notice, <br /> * this list of conditions and the following disclaimer.<br /> * * Redistributions in binary form must reproduce the above copyright notice, <br /> * this list of conditions and the following disclaimer in the documentation <br /> * and/or other materials provided with the distribution.<br /> * * Neither the name of APress nor the names of its contributors <br /> * may be used to endorse or promote products derived from this software <br /> * without specific prior written permission.<br /> * <br /> * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS<br /> * &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT<br /> * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR<br /> * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR<br /> * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,<br /> * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,<br /> * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR<br /> * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF<br /> * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING<br /> * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS<br /> * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.<br /> *<br /> */<br /> #include &lt;QCoreApplication&gt;<br /> #include &quot;server.h&quot;<br /> int main( int argc, char **argv )<br /> {<br /> QCoreApplication app( argc, argv );<br /> <br /> Server server;<br /> if( !server.listen( QHostAddress::Any, 9876 ) )<br /> {<br /> qCritical( &quot;Cannot listen to port 9876.&quot; );<br /> return 1;<br /> }<br /> <br /> return app.exec();<br /> }<br /> <br /> Foundations of Qt Development\Chapter14\tcpserver\server.cpp<br /> /*<br /> * Copyright (c) 2006-2007, Johan Thelin<br /> * <br /> * All rights reserved.<br /> * <br /> * Redistribution and use in source and binary forms, with or without modification, <br /> * are permitted provided that the following conditions are met:<br /> * <br /> * * Redistributions of source code must retain the above copyright notice, <br /> * this list of conditions and the following disclaimer.<br /> * * Redistributions in binary form must reproduce the above copyright notice, <br /> * this list of conditions and the following disclaimer in the documentation <br /> * and/or other materials provided with the distribution.<br /> * * Neither the name of APress nor the names of its contributors <br /> * may be used to endorse or promote products derived from this software <br /> * without specific prior written permission.<br /> * <br /> * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS<br /> * &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT<br /> * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR<br /> * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR<br /> * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,<br /> * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,<br /> * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR<br /> * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF<br /> * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING<br /> * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS<br /> * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.<br /> *<br /> */<br /> #include &lt;QTcpServer&gt;<br /> #include &lt;QTcpSocket&gt;<br /> #include &quot;server.h&quot;<br /> #include &quot;serverthread.h&quot;<br /> Server::Server() : QTcpServer()<br /> {<br /> }<br /> void Server::incomingConnection( int descriptor )<br /> {<br /> ServerThread *thread = new ServerThread( descriptor, this );<br /> <br /> connect( thread, SIGNAL(finished()), thread, SLOT(deleteLater()) );<br /> thread-&gt;start();<br /> }<br /> <br /> Foundations of Qt Development\Chapter14\tcpserver\server.h<br /> /*<br /> * Copyright (c) 2006-2007, Johan Thelin<br /> * <br /> * All rights reserved.<br /> * <br /> * Redistribution and use in source and binary forms, with or without modification, <br /> * are permitted provided that the following conditions are met:<br /> * <br /> * * Redistributions of source code must retain the above copyright notice, <br /> * this list of conditions and the following disclaimer.<br /> * * Redistributions in binary form must reproduce the above copyright notice, <br /> * this list of conditions and the following disclaimer in the documentation <br /> * and/or other materials provided with the distribution.<br /> * * Neither the name of APress nor the names of its contributors <br /> * may be used to endorse or promote products derived from this software <br /> * without specific prior written permission.<br /> * <br /> * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS<br /> * &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT<br /> * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR<br /> * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR<br /> * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,<br /> * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,<br /> * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR<br /> * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF<br /> * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING<br /> * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS<br /> * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.<br /> *<br /> */<br /> #ifndef SERVER_H<br /> #define SERVER_H<br /> #include &lt;QTcpServer&gt;<br /> class Server : public QTcpServer<br /> {<br /> public:<br /> Server();<br /> <br /> protected:<br /> void incomingConnection( int descriptor );<br /> };<br /> #endif // SERVER_H<br /> <br /> Foundations of Qt Development\Chapter14\tcpserver\serverthread.cpp<br /> /*<br /> * Copyright (c) 2006-2007, Johan Thelin<br /> * <br /> * All rights reserved.<br /> * <br /> * Redistribution and use in source and binary forms, with or without modification, <br /> * are permitted provided that the following conditions are met:<br /> * <br /> * * Redistributions of source code must retain the above copyright notice, <br /> * this list of conditions and the following disclaimer.<br /> * * Redistributions in binary form must reproduce the above copyright notice, <br /> * this list of conditions and the following disclaimer in the documentation <br /> * and/or other materials provided with the distribution.<br /> * * Neither the name of APress nor the names of its contributors <br /> * may be used to endorse or promote products derived from this software <br /> * without specific prior written permission.<br /> * <br /> * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS<br /> * &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT<br /> * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR<br /> * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR<br /> * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,<br /> * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,<br /> * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR<br /> * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF<br /> * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING<br /> * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS<br /> * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.<br /> *<br /> */<br /> #include &lt;QBuffer&gt;<br /> #include &lt;QImage&gt;<br /> #include &lt;QImageWriter&gt;<br /> #include &lt;QTcpSocket&gt;<br /> #include &lt;QDir&gt;<br /> #include &lt;QTime&gt;<br /> #include &quot;serverthread.h&quot;<br /> ServerThread::ServerThread( int descriptor, QObject *parent ) : QThread( parent )<br /> {<br /> m_descriptor = descriptor;<br /> }<br /> void ServerThread::run()<br /> {<br /> QTcpSocket socket;<br /> <br /> if( !socket.setSocketDescriptor( m_descriptor ) )<br /> {<br /> qDebug( &quot;Socket error!&quot; );<br /> return;<br /> }<br /> <br /> QBuffer buffer;<br /> QImageWriter writer(&amp;buffer, &quot;PNG&quot;);<br /> writer.write( randomImage() );<br /> <br /> QByteArray data;<br /> QDataStream stream( &amp;data, QIODevice::WriteOnly );<br /> stream.setVersion( QDataStream::Qt_4_0 );<br /> stream &lt;&lt; (quint32)buffer.data().size();<br /> data.append( buffer.data() );<br /> <br /> socket.write( data );<br /> <br /> socket.disconnectFromHost();<br /> socket.waitForDisconnected();<br /> }<br /> QImage ServerThread::randomImage()<br /> {<br /> qsrand(QTime(0,0,0).secsTo(QTime::currentTime()));<br /> <br /> QDir dir(&quot;./images&quot;);<br /> dir.setFilter( QDir::Files );<br /> QFileInfoList entries = dir.entryInfoList();<br /> <br /> if( entries.size() == 0 )<br /> {<br /> qDebug( &quot;No images to show!&quot; );<br /> return QImage();<br /> }<br /> <br /> return QImage( entries.at( qrand() % entries.size() ).absoluteFilePath() );<br /> }<br /> <br /> Foundations of Qt Development\Chapter14\tcpserver\serverthread.h<br /> /*<br /> * Copyright (c) 2006-2007, Johan Thelin<br /> * <br /> * All rights reserved.<br /> * <br /> * Redistribution and use in source and binary forms, with or without modification, <br /> * are permitted provided that the following conditions are met:<br /> * <br /> * * Redistributions of source code must retain the above copyright notice, <br /> * this list of conditions and the following disclaimer.<br /> * * Redistributions in binary form must reproduce the above copyright notice, <br /> * this list of conditions and the following disclaimer in the documentation <br /> * and/or other materials provided with the distribution.<br /> * * Neither the name of APress nor the names of its contributors <br /> * may be used to endorse or promote products derived from this software <br /> * without specific prior written permission.<br /> * <br /> * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS<br /> * &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT<br /> * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR<br /> * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR<br /> * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,<br /> * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,<br /> * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR<br /> * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF<br /> * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING<br /> * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS<br /> * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.<br /> *<br /> */<br /> #ifndef SERVERTHREAD_H<br /> #define SERVERTHREAD_H<br /> #include &lt;QThread&gt;<br /> #include &lt;QImage&gt;<br /> class ServerThread : public QThread<br /> {<br /> public:<br /> ServerThread( int descriptor, QObject *parent );<br /> <br /> void run();<br /> private:<br /> QImage randomImage();<br /> <br /> int m_descriptor;<br /> };<br /> #endif // SERVERTHREAD_H<br /> <br /> <br /> &lt;/source&gt;<br /> <br /> <br /> ==QTcpServer based server 2==<br /> <br /> <br /> <br /> &lt;source lang=&quot;cpp&quot;&gt; <br /> <br /> /****************************************************************************<br /> **<br /> ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).<br /> ** All rights reserved.<br /> ** Contact: Nokia Corporation (qt-info@nokia.com)<br /> **<br /> ** This file is part of the examples of the Qt Toolkit.<br /> **<br /> ** $QT_BEGIN_LICENSE:LGPL$<br /> ** Commercial Usage<br /> ** Licensees holding valid Qt Commercial licenses may use this file in<br /> ** accordance with the Qt Commercial License Agreement provided with the<br /> ** Software or, alternatively, in accordance with the terms contained in<br /> ** a written agreement between you and Nokia.<br /> **<br /> ** GNU Lesser General Public License Usage<br /> ** Alternatively, this file may be used under the terms of the GNU Lesser<br /> ** General Public License version 2.1 as published by the Free Software<br /> ** Foundation and appearing in the file LICENSE.LGPL included in the<br /> ** packaging of this file. Please review the following information to<br /> ** ensure the GNU Lesser General Public License version 2.1 requirements<br /> ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.<br /> **<br /> ** In addition, as a special exception, Nokia gives you certain additional<br /> ** rights. These rights are described in the Nokia Qt LGPL Exception<br /> ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.<br /> **<br /> ** GNU General Public License Usage<br /> ** Alternatively, this file may be used under the terms of the GNU<br /> ** General Public License version 3.0 as published by the Free Software<br /> ** Foundation and appearing in the file LICENSE.GPL included in the<br /> ** packaging of this file. Please review the following information to<br /> ** ensure the GNU General Public License version 3.0 requirements will be<br /> ** met: http://www.gnu.org/copyleft/gpl.html.<br /> **<br /> ** If you have questions regarding the use of this file, please contact<br /> ** Nokia at qt-info@nokia.com.<br /> ** $QT_END_LICENSE$<br /> **<br /> ****************************************************************************/<br /> #ifndef SERVER_H<br /> #define SERVER_H<br /> #include &lt;QDialog&gt;<br /> QT_BEGIN_NAMESPACE<br /> class QLabel;<br /> class QPushButton;<br /> class QTcpServer;<br /> QT_END_NAMESPACE<br /> <br /> class Server : public QDialog<br /> {<br /> Q_OBJECT<br /> public:<br /> Server(QWidget *parent = 0);<br /> private slots:<br /> void sendFortune();<br /> private:<br /> QLabel *statusLabel;<br /> QPushButton *quitButton;<br /> QTcpServer *tcpServer;<br /> QStringList fortunes;<br /> };<br /> <br /> #endif<br /> <br /> <br /> <br /> #include &lt;QtGui&gt;<br /> #include &lt;QtNetwork&gt;<br /> #include &lt;stdlib.h&gt;<br /> #include &quot;server.h&quot;<br /> Server::Server(QWidget *parent)<br /> : QDialog(parent)<br /> {<br /> statusLabel = new QLabel;<br /> quitButton = new QPushButton(tr(&quot;Quit&quot;));<br /> quitButton-&gt;setAutoDefault(false);<br /> <br /> tcpServer = new QTcpServer(this);<br /> if (!tcpServer-&gt;listen()) {<br /> QMessageBox::critical(this, tr(&quot;Fortune Server&quot;),<br /> tr(&quot;Unable to start the server: %1.&quot;)<br /> .arg(tcpServer-&gt;errorString()));<br /> close();<br /> return;<br /> }<br /> <br /> statusLabel-&gt;setText(tr(&quot;The server is running on port %1.\n&quot;<br /> &quot;Run the Fortune Client example now.&quot;)<br /> .arg(tcpServer-&gt;serverPort()));<br /> <br /> fortunes &lt;&lt; tr(&quot;You&quot;ve been leading a dog&quot;s life. Stay off the furniture.&quot;)<br /> &lt;&lt; tr(&quot;You&quot;ve got to think about tomorrow.&quot;)<br /> &lt;&lt; tr(&quot;You will be surprised by a loud noise.&quot;)<br /> &lt;&lt; tr(&quot;You will feel hungry again in another hour.&quot;)<br /> &lt;&lt; tr(&quot;You might have mail.&quot;)<br /> &lt;&lt; tr(&quot;You cannot kill time without injuring eternity.&quot;)<br /> &lt;&lt; tr(&quot;Computers are not intelligent. They only think they are.&quot;);<br /> <br /> connect(quitButton, SIGNAL(clicked()), this, SLOT(close()));<br /> connect(tcpServer, SIGNAL(newConnection()), this, SLOT(sendFortune()));<br /> <br /> QHBoxLayout *buttonLayout = new QHBoxLayout;<br /> buttonLayout-&gt;addStretch(1);<br /> buttonLayout-&gt;addWidget(quitButton);<br /> buttonLayout-&gt;addStretch(1);<br /> QVBoxLayout *mainLayout = new QVBoxLayout;<br /> mainLayout-&gt;addWidget(statusLabel);<br /> mainLayout-&gt;addLayout(buttonLayout);<br /> setLayout(mainLayout);<br /> setWindowTitle(tr(&quot;Fortune Server&quot;));<br /> }<br /> <br /> void Server::sendFortune()<br /> {<br /> QByteArray block;<br /> QDataStream out(&amp;block, QIODevice::WriteOnly);<br /> out.setVersion(QDataStream::Qt_4_0);<br /> <br /> out &lt;&lt; (quint16)0;<br /> out &lt;&lt; fortunes.at(qrand() % fortunes.size());<br /> out.device()-&gt;seek(0);<br /> out &lt;&lt; (quint16)(block.size() - sizeof(quint16));<br /> <br /> QTcpSocket *clientConnection = tcpServer-&gt;nextPendingConnection();<br /> connect(clientConnection, SIGNAL(disconnected()),<br /> clientConnection, SLOT(deleteLater()));<br /> <br /> clientConnection-&gt;write(block);<br /> clientConnection-&gt;disconnectFromHost();<br /> }<br /> <br /> <br /> <br /> #include &lt;QApplication&gt;<br /> #include &lt;QtCore&gt;<br /> #include &lt;stdlib.h&gt;<br /> #include &quot;server.h&quot;<br /> int main(int argc, char *argv[])<br /> {<br /> QApplication app(argc, argv);<br /> Server server;<br /> server.show();<br /> qsrand(QTime(0,0,0).secsTo(QTime::currentTime()));<br /> return server.exec();<br /> }<br /> <br /> <br /> &lt;/source&gt;<br /> <br /> <br /> ==Thread based server==<br /> <br /> <br /> <br /> &lt;source lang=&quot;cpp&quot;&gt; <br /> /****************************************************************************<br /> **<br /> ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).<br /> ** All rights reserved.<br /> ** Contact: Nokia Corporation (qt-info@nokia.com)<br /> **<br /> ** This file is part of the examples of the Qt Toolkit.<br /> **<br /> ** $QT_BEGIN_LICENSE:LGPL$<br /> ** Commercial Usage<br /> ** Licensees holding valid Qt Commercial licenses may use this file in<br /> ** accordance with the Qt Commercial License Agreement provided with the<br /> ** Software or, alternatively, in accordance with the terms contained in<br /> ** a written agreement between you and Nokia.<br /> **<br /> ** GNU Lesser General Public License Usage<br /> ** Alternatively, this file may be used under the terms of the GNU Lesser<br /> ** General Public License version 2.1 as published by the Free Software<br /> ** Foundation and appearing in the file LICENSE.LGPL included in the<br /> ** packaging of this file. Please review the following information to<br /> ** ensure the GNU Lesser General Public License version 2.1 requirements<br /> ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.<br /> **<br /> ** In addition, as a special exception, Nokia gives you certain additional<br /> ** rights. These rights are described in the Nokia Qt LGPL Exception<br /> ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.<br /> **<br /> ** GNU General Public License Usage<br /> ** Alternatively, this file may be used under the terms of the GNU<br /> ** General Public License version 3.0 as published by the Free Software<br /> ** Foundation and appearing in the file LICENSE.GPL included in the<br /> ** packaging of this file. Please review the following information to<br /> ** ensure the GNU General Public License version 3.0 requirements will be<br /> ** met: http://www.gnu.org/copyleft/gpl.html.<br /> **<br /> ** If you have questions regarding the use of this file, please contact<br /> ** Nokia at qt-info@nokia.com.<br /> ** $QT_END_LICENSE$<br /> **<br /> ****************************************************************************/<br /> #ifndef FORTUNESERVER_H<br /> #define FORTUNESERVER_H<br /> #include &lt;QStringList&gt;<br /> #include &lt;QTcpServer&gt;<br /> <br /> class FortuneServer : public QTcpServer<br /> {<br /> Q_OBJECT<br /> public:<br /> FortuneServer(QObject *parent = 0);<br /> protected:<br /> void incomingConnection(int socketDescriptor);<br /> private:<br /> QStringList fortunes;<br /> };<br /> <br /> #endif<br /> <br /> <br /> <br /> <br /> #include &quot;fortuneserver.h&quot;<br /> #include &quot;fortunethread.h&quot;<br /> #include &lt;stdlib.h&gt;<br /> <br /> FortuneServer::FortuneServer(QObject *parent)<br /> : QTcpServer(parent)<br /> {<br /> fortunes &lt;&lt; tr(&quot;You&quot;ve been leading a dog&quot;s life. Stay off the furniture.&quot;)<br /> &lt;&lt; tr(&quot;You&quot;ve got to think about tomorrow.&quot;)<br /> &lt;&lt; tr(&quot;You will be surprised by a loud noise.&quot;)<br /> &lt;&lt; tr(&quot;You will feel hungry again in another hour.&quot;)<br /> &lt;&lt; tr(&quot;You might have mail.&quot;)<br /> &lt;&lt; tr(&quot;You cannot kill time without injuring eternity.&quot;)<br /> &lt;&lt; tr(&quot;Computers are not intelligent. They only think they are.&quot;);<br /> }<br /> <br /> void FortuneServer::incomingConnection(int socketDescriptor)<br /> {<br /> QString fortune = fortunes.at(qrand() % fortunes.size());<br /> FortuneThread *thread = new FortuneThread(socketDescriptor, fortune, this);<br /> connect(thread, SIGNAL(finished()), thread, SLOT(deleteLater()));<br /> thread-&gt;start();<br /> }<br /> <br /> <br /> <br /> #ifndef DIALOG_H<br /> #define DIALOG_H<br /> #include &lt;QDialog&gt;<br /> #include &quot;fortuneserver.h&quot;<br /> QT_BEGIN_NAMESPACE<br /> class QLabel;<br /> class QPushButton;<br /> QT_END_NAMESPACE<br /> class Dialog : public QDialog<br /> {<br /> Q_OBJECT<br /> public:<br /> Dialog(QWidget *parent = 0);<br /> private:<br /> QLabel *statusLabel;<br /> QPushButton *quitButton;<br /> FortuneServer server;<br /> };<br /> #endif<br /> <br /> <br /> #include &lt;QtGui&gt;<br /> #include &lt;QtNetwork&gt;<br /> #include &lt;stdlib.h&gt;<br /> #include &quot;dialog.h&quot;<br /> #include &quot;fortuneserver.h&quot;<br /> Dialog::Dialog(QWidget *parent)<br /> : QDialog(parent)<br /> {<br /> statusLabel = new QLabel;<br /> quitButton = new QPushButton(tr(&quot;Quit&quot;));<br /> quitButton-&gt;setAutoDefault(false);<br /> if (!server.listen()) {<br /> QMessageBox::critical(this, tr(&quot;Threaded Fortune Server&quot;),<br /> tr(&quot;Unable to start the server: %1.&quot;)<br /> .arg(server.errorString()));<br /> close();<br /> return;<br /> }<br /> statusLabel-&gt;setText(tr(&quot;The server is running on port %1.\n&quot;<br /> &quot;Run the Fortune Client example now.&quot;)<br /> .arg(server.serverPort()));<br /> connect(quitButton, SIGNAL(clicked()), this, SLOT(close()));<br /> QHBoxLayout *buttonLayout = new QHBoxLayout;<br /> buttonLayout-&gt;addStretch(1);<br /> buttonLayout-&gt;addWidget(quitButton);<br /> buttonLayout-&gt;addStretch(1);<br /> QVBoxLayout *mainLayout = new QVBoxLayout;<br /> mainLayout-&gt;addWidget(statusLabel);<br /> mainLayout-&gt;addLayout(buttonLayout);<br /> setLayout(mainLayout);<br /> setWindowTitle(tr(&quot;Threaded Fortune Server&quot;));<br /> }<br /> <br /> <br /> #ifndef FORTUNETHREAD_H<br /> #define FORTUNETHREAD_H<br /> #include &lt;QThread&gt;<br /> #include &lt;QTcpSocket&gt;<br /> <br /> class FortuneThread : public QThread<br /> {<br /> Q_OBJECT<br /> public:<br /> FortuneThread(int socketDescriptor, const QString &amp;fortune, QObject *parent);<br /> void run();<br /> signals:<br /> void error(QTcpSocket::SocketError socketError);<br /> private:<br /> int socketDescriptor;<br /> QString text;<br /> };<br /> <br /> #endif<br /> <br /> <br /> <br /> #include &quot;fortunethread.h&quot;<br /> #include &lt;QtNetwork&gt;<br /> <br /> FortuneThread::FortuneThread(int socketDescriptor, const QString &amp;fortune, QObject *parent)<br /> : QThread(parent), socketDescriptor(socketDescriptor), text(fortune)<br /> {<br /> }<br /> <br /> void FortuneThread::run()<br /> {<br /> QTcpSocket tcpSocket;<br /> <br /> if (!tcpSocket.setSocketDescriptor(socketDescriptor)) {<br /> emit error(tcpSocket.error());<br /> return;<br /> }<br /> <br /> QByteArray block;<br /> QDataStream out(&amp;block, QIODevice::WriteOnly);<br /> out.setVersion(QDataStream::Qt_4_0);<br /> out &lt;&lt; (quint16)0;<br /> out &lt;&lt; text;<br /> out.device()-&gt;seek(0);<br /> out &lt;&lt; (quint16)(block.size() - sizeof(quint16));<br /> <br /> tcpSocket.write(block);<br /> tcpSocket.disconnectFromHost();<br /> tcpSocket.waitForDisconnected();<br /> }<br /> <br /> <br /> <br /> #include &lt;QApplication&gt;<br /> #include &lt;QtCore&gt;<br /> #include &lt;stdlib.h&gt;<br /> #include &quot;dialog.h&quot;<br /> int main(int argc, char *argv[])<br /> {<br /> QApplication app(argc, argv);<br /> Dialog dialog;<br /> dialog.show();<br /> qsrand(QTime(0,0,0).secsTo(QTime::currentTime()));<br /> return dialog.exec();<br /> }<br /> <br /> <br /> &lt;/source&gt;</div> Admin

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48