linux::CClientSocket


All platform-dependent classes have been moved to Platform Package in release 10.0.0.

This class is available on Linux platform only

Corresponding class for Windows platform is here.

Corresponding class for Android platform is here.

Implementation of the IClientSocket interface for Linux platform.

This class should not be used alone. The instance of this class is created by the server socket and Application->getNetwork()->TCPConnect() method and which is used to create new TCP connection to specified server. See INetwork to find out about TCPConnect() arguments and result type.

You can find more information in comments below. Overrided methods can be found in corresponding base interface.

class CClientSocket :public virtual IClientSocket, public CSocket
    {
    public:
        float getTimeout() override; // By default 5 seconds 
    
        bool setTimeout(const float value) override;
    
        bool OpenWriteBuffer() override;
        bool CloseWriteBuffer() override;
    
        bool Send(const char *data, const int size, const bool inverse = false) override;
        bool Receive(char *buffer, const int size, const bool inverse = false) override;
    
        bool Write(const bool data) override;
        bool Write(const int data, const bool inverse = false) override;
        bool Write(const float data, const bool inverse = false) override;
        bool Write(const String &data, const bool inverse = false) override;
        bool Write(const AnsiString &data, const bool inverse = false) override;
    
        bool Read(bool &data) override;
        bool Read(int &data, const bool inverse = false) override;
        bool Read(float &data, const bool inverse = false) override;
        bool Read(String &data, const bool inverse = false) override;
        bool Read(AnsiString &data, const bool inverse = false) override;
    
        ISocket::DATA_EXIST isDataExist(ISocket::ERROR_TYPE &error) override;
    
        CClientSocket(SOCKET_HANDLE socket, const AnsiString &local_ip, const AnsiString &remote_ip, const int local_port, const int remote_port);
    };
Namespace: nitisa::standard::linux
Include: Standard/Platform/Linux/ClientSocket.h