~kgunn72/mir/dont-crash-when-shooting-invalid-surface

« back to all changes in this revision

Viewing changes to src/server/frontend/socket_messenger.h

  • Committer: Tarmac
  • Author(s): Alan Griffiths, Alexandros Frantzis, Daniel van Vugt, Kevin DuBois, Christopher James Halse Rogers, chris.gagnon, Mathieu Trudel-Lapierre, Robert Carr, Automatic PS uploader, Kevin Gunn, Daniel d'Andrada, Christopher James Halse Rogers, Michael Terry, Brandon Schaefer, Timo Jyrinki, Mir Team, Andreas Pokorny
  • Date: 2013-12-20 11:11:22 UTC
  • mfrom: (1169.1.1 version-0.1.3)
  • Revision ID: tarmac-20131220111122-h503fd1fnq7pn9za
Latest upstream release: Mir 0.1.3 (r1298).

Approved by Alan Griffiths, PS Jenkins bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 * Authored by: Kevin DuBois <kevin.dubois@canonical.com>
17
17
 */
18
18
 
19
 
#ifndef MIR_FRONTEND_SOCKET_MESSENGER_H_ 
20
 
#define MIR_FRONTEND_SOCKET_MESSENGER_H_ 
 
19
#ifndef MIR_FRONTEND_SOCKET_MESSENGER_H_
 
20
#define MIR_FRONTEND_SOCKET_MESSENGER_H_
21
21
#include "message_sender.h"
22
22
#include "message_receiver.h"
23
23
#include <mutex>
37
37
    void send(std::string const& body);
38
38
    void send(std::string const& body, FdSets const& fd_set);
39
39
 
40
 
    void async_receive_msg(MirReadHandler const& handler, boost::asio::streambuf& buffer, size_t size); 
 
40
    void async_receive_msg(MirReadHandler const& handler, boost::asio::streambuf& buffer, size_t size);
41
41
    pid_t client_pid();
42
42
 
43
43
private:
44
44
    std::shared_ptr<boost::asio::local::stream_protocol::socket> socket;
45
 
    
 
45
 
46
46
    std::mutex message_lock;
47
47
    std::vector<char> whole_message;
48
 
    
 
48
 
49
49
    void send_fds_locked(std::unique_lock<std::mutex> const& lock, std::vector<int32_t> const& fds);
50
50
};
51
51
}
52
52
}
53
53
}
54
54
 
55
 
#endif /* MIR_FRONTEND_SOCKET_MESSENGER_H_ */ 
 
55
#endif /* MIR_FRONTEND_SOCKET_MESSENGER_H_ */