This page has been translated automatically.
Видеоуроки
Интерфейс
Основы
Продвинутый уровень
Подсказки и советы
Основы
Программирование на C#
Рендеринг
Профессиональный уровень (SIM)
Принципы работы
Свойства (properties)
Компонентная Система
Рендер
Физика
Редактор UnigineEditor
Обзор интерфейса
Работа с ассетами
Контроль версий
Настройки и предпочтения
Работа с проектами
Настройка параметров ноды
Setting Up Materials
Настройка свойств
Освещение
Sandworm
Использование инструментов редактора для конкретных задач
Расширение функционала редактора
Встроенные объекты
Ноды (Nodes)
Объекты (Objects)
Эффекты
Декали
Источники света
Geodetics
World-ноды
Звуковые объекты
Объекты поиска пути
Player-ноды
Программирование
Основы
Настройка среды разработки
Примеры использования
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Плагины
Форматы файлов
Материалы и шейдеры
Rebuilding the Engine Tools
Интерфейс пользователя (GUI)
Двойная точность координат
API
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes
Работа с контентом
Оптимизация контента
Материалы
Визуальный редактор материалов
Сэмплы материалов
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Учебные материалы
Внимание! Эта версия документация УСТАРЕЛА, поскольку относится к более ранней версии SDK! Пожалуйста, переключитесь на самую актуальную документацию для последней версии SDK.
Внимание! Эта версия документации описывает устаревшую версию SDK, которая больше не поддерживается! Пожалуйста, обновитесь до последней версии SDK.

Unigine::Plugins::SSLSocket Class

Warning
The functionality described in this article is not available in the Community SDK edition.
You should upgrade to Engineering / Sim SDK edition to use it.
Header: #include <plugins/Unigine/SSLSocket/UnigineSSLSocket.h>

SSLSocket Class

Enums

X509_NAME_TYPE#

ИмяОписание
X509_NAME_TYPE_CERT_COMMON_NAME = Server name protected by a self-signed certificate.
X509_NAME_TYPE_CERT_ORGANIZATION = Name of the organization protected by a self-signed certificate.
X509_NAME_TYPE_CA_CERT_COMMON_NAME = Server name protected by a server certificate issued by the Certification Agency.
X509_NAME_TYPE_CA_CERT_ORGANIZATION = Name of the organization for which the SSL certificate is issued by the Certification Agency.

LOADER_TYPE#

ИмяОписание
LOADER_TYPE_RSA_KEY = RSA key.
LOADER_TYPE_X509_CERT = Self-signed X.509 certificate.
LOADER_TYPE_X509_CACERT = X.509 certificate issued by a Certification Agency.

Members


int open ( int port ) #

Opens the socket on a given port. When the socket receives data, packets from all network interfaces will be received. When the socket sends data, the default IP address will be used.

Arguments

  • int port - Port number, on which the socket will be opened.

Return value

1 if the socket is opened successfully; otherwise, 0.

int open ( const char * host, int port ) #

Opens the socket on a given port. When the socket receives data, packets from all network interfaces will be received. When the socket sends data, the default IP address will be used.

Arguments

  • const char * host - Host name, on which the socket will be opened.
  • int port - Port number, on which the socket will be opened.

Return value

1 if the socket is opened successfully; otherwise, 0.

int close ( ) #

Closes the socket.

Return value

1 if the socket is closed successfully; otherwise, 0.

int bind ( ) #

Binds the socket to an address figured out from the host used for socket initialization.

Return value

1 if the address is bound; otherwise, 0.

int listen ( int num ) #

Makes the socket listen to connections.

Arguments

  • int num - Maximum number of pending connections.

Return value

1 if the socket has started listening; otherwise, 0.

int accept ( SSLSocketInterface & socket ) #

Accepts a connection on the socket.

Arguments

  • SSLSocketInterface & socket - Socket that is bound to an address and listens to connections.

Return value

1 if the connection is accepted; otherwise, 0.

int connect ( ) #

Initiates a connection on the socket.

Return value

1 if the connection is initialized; otherwise, 0.

int nonblock ( ) #

Makes the socket a non-blocking one.

Return value

1 if the socket has become non-blocking; otherwise, 0.

int block ( ) #

Sets up a blocking socket.

Return value

1 if the socket is opened; otherwise, 0.

int load ( SSLSocketInterface::LOADER_TYPE type, const char * name, const char * password ) #

Loads a certificate from the file.

Arguments

  • SSLSocketInterface::LOADER_TYPE type - Certificate type, one of the LOADER_TYPE values.
  • const char * name - Certificate file name.
  • const char * password - Certificate password.

Return value

1 if the certificate is loaded successfully, otherwise 0.

int parse ( SSLSocketInterface::LOADER_TYPE type, const char * source, const char * password ) #

Parses a specified certificate.

Arguments

  • SSLSocketInterface::LOADER_TYPE type - Certificate type, one of the LOADER_TYPE values.
  • const char * source - Certificate source.
  • const char * password - Certificate password.

Return value

1 if the certificate is loaded successfully, otherwise 0.

int getHandshake ( ) #

Checks if the handshake is successful.

Return value

1 if the handshake is successful, otherwise 0.

const char * getInfo ( SSLSocketInterface::X509_NAME_TYPE info ) #

Returns information about the certificate: organization or host name, depending on the argument.

Arguments

  • SSLSocketInterface::X509_NAME_TYPE info - Type of information to be obtained, one of the X509_NAME_TYPE values.

Return value

Information about the certificate issuer.

const char * getHost ( ) #

Returns the socket address.

Return value

Host name

int getPort ( ) #

Returns the port number of the socket.

Return value

Port number

int isOpened ( ) #

Checks if the socket has been opened.

Return value

1 if the socket is opened; otherwise, 0.

int isAvailable ( ) #

Checks if the socket has been established, but not opened.

Return value

1 if the socket is available; otherwise, 0.

Ptr<Stream> getStream ( ) #

Returns a stream to read or write data via SSL.

Return value

Stream to read or write data via SSL.
Last update: 23.06.2023
Build: ()