class ui.SocketPropertySet

class SocketPropertySet {
    // enums

    enum Defaults;
    bitflag enum PropertyId;

    // fields

    static string_t const DefaultRemoteAddress = "ioninja.com";
    ui.StringProperty* m_remoteAddressProp;
    ui.IntProperty* m_remotePortProp;
    ui.BoolProperty* m_useReconnectProp;
    ui.IntProperty* m_reconnectTimeoutProp;
    ui.BoolProperty* m_useLocalAddressProp;
    ui.EnumProperty* m_adapterProp;
    ui.IntProperty* m_localPortProp;
    ui.BoolProperty* m_reuseLocalAddressProp;
    ui.BoolProperty* m_tcpKeepAliveProp;
    ui.BoolProperty* m_tcpNagleProp;
    ui.BoolProperty* m_tcpResetProp;
    ui.BoolProperty* m_udpBroadcastProp;
    string_t m_defaultRemoteAddress = DefaultRemoteAddress;
    uint16_t m_defaultRemotePort = Defaults.RemotePort;
    uint16_t m_defaultLocalPort = Defaults.LocalPort;
    uint_t m_defaultReconnectTimeout = Defaults.ReconnectTimeout;

    // methods

    void createProperties(
        ui.PropertyGrid* propertyGrid,
        ui.Property* group = null,
        ui.Property* insertBefore = null,
        ui.SocketPropertySet.PropertyId mask = PropertyId.AllTcpClient
    );

    void load(doc.Storage* storage);
    void save(doc.Storage* storage);
    void restoreDefaults();
};