~ubuntu-branches/debian/sid/filezilla/sid

« back to all changes in this revision

Viewing changes to src/include/socket.h

  • Committer: Bazaar Package Importer
  • Author(s): Adrien Cunin
  • Date: 2009-08-20 00:38:30 UTC
  • mfrom: (1.3.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20090820003830-0prw6uzkgv06kbkh
* New upstream release (LP: #389525)
   - New feature: remote file search
   - pkg-config is now used to search for gnutls (Closes: #529822)
* Changed package descriptions, not mentioning Windows anymore
* Updated features list in package description
* Added pkg-config to the build-dependencies
* Build-Depend on libgnutls-dev version >= 2.8.3, as required by upstream
* Updated Standards-Version to 3.8.3
* debian/rules: touch magic on configure and configure.in to make sure the
  first has a more recent timestamp than the second (Closes: #529701)

Show diffs side-by-side

added added

removed removed

Lines of Context:
111
111
        };
112
112
        enum SocketState GetState();
113
113
 
 
114
        enum address_family
 
115
        {
 
116
                unspec, // AF_UNSPEC
 
117
                ipv4,   // AF_INET
 
118
                ipv6    // AF_INET6
 
119
        };              
 
120
                
114
121
        // Connects to the given host, given as name, IPv4 or IPv6 address.
115
122
        // Returns 0 on success, else an error code. Note: EINPROGRESS is
116
123
        // not really an error. On success, you should still wait for the
118
125
        // If host is a name that can be resolved, a hostaddress socket event gets sent.
119
126
        // Once connections got established, a connection event gets sent. If
120
127
        // connection could not be established, a close event gets sent.
121
 
        int Connect(wxString host, unsigned int port);
 
128
        int Connect(wxString host, unsigned int port, enum address_family family = unspec);
122
129
 
123
130
        // After receiving a send or receive event, you can call these functions
124
131
        // as long as their return value is positive.
136
143
        int GetLocalPort(int& error);
137
144
        int GetRemotePort(int& error);
138
145
 
139
 
        // If connected, either AF_INET or AF_INET6
140
 
        // AF_UNSPEC otherwise
141
 
        int GetAddressFamily() const;
 
146
        // If connected, either ipv4 or ipv6, unspec otherwise
 
147
        enum address_family GetAddressFamily() const;
142
148
 
143
 
        // Returns either AF_INET or AF_INET6 on success, AF_UNSPEC on error
144
 
        int GetConnectionType() const;
145
 
        
146
149
        static wxString GetErrorString(int error);
147
150
        static wxString GetErrorDescription(int error);
148
151
 
154
157
 
155
158
        static wxString AddressToString(const struct sockaddr* addr, int addr_len, bool with_port = true);
156
159
 
157
 
        int Listen(int family, int port = 0);
 
160
        int Listen(enum address_family family, int port = 0);
158
161
        CSocket* Accept(int& error);
159
162
 
160
163
        enum Flags
186
189
 
187
190
        wxString m_host;
188
191
        unsigned int m_port;
 
192
        int m_family;
189
193
 
190
194
        int m_flags;
191
195