~ubuntu-branches/ubuntu/saucy/filezilla/saucy-proposed

« back to all changes in this revision

Viewing changes to src/include/socket.h

  • Committer: Package Import Robot
  • Author(s): Adrien Cunin
  • Date: 2012-12-07 17:17:17 UTC
  • mfrom: (1.1.31)
  • Revision ID: package-import@ubuntu.com-20121207171717-nt6as62u4pa1uv11
Tags: 3.6.0.2-1ubuntu1
* Merge from Debian experimental. Remaining Ubuntu change:
   - Added debian/patches/11_use-decimal-si-by-default.patch in order to
     comply with UnitsPolicy

Show diffs side-by-side

added added

removed removed

Lines of Context:
59
59
        ~CSocketEventDispatcher();
60
60
 
61
61
        virtual bool ProcessEvent(wxEvent& event);
62
 
        
 
62
 
63
63
        std::list<CSocketEvent*> m_pending_events;
64
64
 
65
65
        wxCriticalSection m_sync;
84
84
        virtual ~CSocketEventSource();
85
85
};
86
86
 
 
87
class CCallback
 
88
{
 
89
public:
 
90
        virtual void cb() {}
 
91
};
 
92
 
87
93
class CSocketThread;
88
94
class CSocket : public CSocketEventSource
89
95
{
116
122
                unspec, // AF_UNSPEC
117
123
                ipv4,   // AF_INET
118
124
                ipv6    // AF_INET6
119
 
        };              
120
 
                
 
125
        };
 
126
 
121
127
        // Connects to the given host, given as name, IPv4 or IPv6 address.
122
128
        // Returns 0 on success, else an error code. Note: EINPROGRESS is
123
129
        // not really an error. On success, you should still wait for the
172
178
        // accepted sockets
173
179
        void SetBufferSizes(int size_read, int size_write);
174
180
 
 
181
        void SetSynchronousReadCallback(CCallback* cb);
 
182
 
175
183
protected:
176
184
        static int DoSetFlags(int fd, int flags, int flags_mask);
177
185
        static int DoSetBufferSizes(int fd, int size_read, int size_write);
194
202
        int m_flags;
195
203
 
196
204
        int m_buffer_sizes[2];
 
205
 
 
206
        CCallback* m_synchronous_read_cb;
197
207
};
198
208
 
199
209
#ifdef __WXMSW__