Home
last modified time | relevance | path

Searched refs:socket_fd (Results 1 – 8 of 8) sorted by relevance

/system/bt/vendor_libs/test_vendor_lib/desktop/
Dtest_environment.cc72 int socket_fd = remote_hci_transport_.SetUp(hci_server_port_); in SetUpHciServer() local
77 if (socket_fd == -1) { in SetUpHciServer()
82 async_manager_.WatchFdForNonBlockingReads(socket_fd, [this, connection_callback](int socket_fd) { in SetUpHciServer() argument
83 int conn_fd = remote_hci_transport_.Accept(socket_fd); in SetUpHciServer()
98 int socket_fd = remote_link_layer_transport_.SetUp(link_server_port_); in SetUpLinkLayerServer() local
103 if (socket_fd == -1) { in SetUpLinkLayerServer()
108 async_manager_.WatchFdForNonBlockingReads(socket_fd, [this, connection_callback](int socket_fd) { in SetUpLinkLayerServer() argument
109 int conn_fd = remote_link_layer_transport_.Accept(socket_fd); in SetUpLinkLayerServer()
123 int socket_fd = socket(AF_INET, SOCK_STREAM, 0); in ConnectToRemoteServer() local
124 if (socket_fd < 1) { in ConnectToRemoteServer()
[all …]
/system/bt/test/rootcanal/
Dbluetooth_hci.cc287 int socket_fd = remote_hci_transport_.SetUp(port); in SetUpHciServer() local
293 if (socket_fd == -1) { in SetUpHciServer()
298 async_manager_.WatchFdForNonBlockingReads(socket_fd, [this, connection_callback](int socket_fd) { in SetUpHciServer() argument
299 int conn_fd = remote_hci_transport_.Accept(socket_fd); in SetUpHciServer()
314 int socket_fd = remote_link_layer_transport_.SetUp(port); in SetUpLinkLayerServer() local
320 if (socket_fd == -1) { in SetUpLinkLayerServer()
325 async_manager_.WatchFdForNonBlockingReads(socket_fd, [this, connection_callback](int socket_fd) { in SetUpLinkLayerServer() argument
326 int conn_fd = remote_link_layer_transport_.Accept(socket_fd); in SetUpLinkLayerServer()
340 int socket_fd = socket(AF_INET, SOCK_STREAM, 0); in ConnectToRemoteServer() local
341 if (socket_fd < 1) { in ConnectToRemoteServer()
[all …]
/system/bt/vendor_libs/test_vendor_lib/model/setup/
Dtest_model.cc167 void TestModel::AddLinkLayerConnection(int socket_fd, Phy::Type phy_type) { in AddLinkLayerConnection() argument
168 std::shared_ptr<Device> dev = LinkLayerSocketDevice::Create(socket_fd, phy_type); in AddLinkLayerConnection()
177 void TestModel::IncomingLinkLayerConnection(int socket_fd) { in IncomingLinkLayerConnection() argument
179 AddLinkLayerConnection(socket_fd, Phy::Type::BR_EDR); in IncomingLinkLayerConnection()
183 int socket_fd = connect_to_remote_(server, port); in AddRemote() local
184 if (socket_fd < 0) { in AddRemote()
187 AddLinkLayerConnection(socket_fd, phy_type); in AddRemote()
190 void TestModel::IncomingHciConnection(int socket_fd) { in IncomingHciConnection() argument
191 auto dev = HciSocketDevice::Create(socket_fd); in IncomingHciConnection()
209 dev->RegisterCloseCallback([this, socket_fd, index, user_id] { in IncomingHciConnection()
[all …]
Dtest_model.h72 void AddLinkLayerConnection(int socket_fd, Phy::Type phy_type);
73 void IncomingLinkLayerConnection(int socket_fd);
74 void IncomingHciConnection(int socket_fd);
77 void OnHciConnectionClosed(int socket_fd, size_t index, AsyncUserId user_id);
/system/bt/vendor_libs/test_vendor_lib/model/devices/
Dhci_socket_device.h29 HciSocketDevice(int socket_fd);
32 static std::shared_ptr<HciSocketDevice> Create(int socket_fd) { in Create() argument
33 return std::make_shared<HciSocketDevice>(socket_fd); in Create()
Dlink_layer_socket_device.h31 LinkLayerSocketDevice(int socket_fd, Phy::Type phy_type);
35 static std::shared_ptr<Device> Create(int socket_fd, Phy::Type phy_type) { in Create() argument
36 return std::make_shared<LinkLayerSocketDevice>(socket_fd, phy_type); in Create()
Dlink_layer_socket_device.cc29 LinkLayerSocketDevice::LinkLayerSocketDevice(int socket_fd, Phy::Type phy_type) in LinkLayerSocketDevice() argument
30 : socket_(socket_fd), in LinkLayerSocketDevice()
/system/bt/gd/hal/
Dhci_hal_host.cc174 int socket_fd = socket(AF_BLUETOOTH, SOCK_RAW, BTPROTO_HCI); in ConnectToSocket() local
175 if (socket_fd < 1) { in ConnectToSocket()
183 ::close(socket_fd); in ConnectToSocket()
192 if (bind(socket_fd, (struct sockaddr*)&addr, sizeof(addr)) < 0) { in ConnectToSocket()
194 ::close(socket_fd); in ConnectToSocket()
198 return socket_fd; in ConnectToSocket()
207 int socket_fd = socket(AF_INET, SOCK_STREAM, 0); in ConnectToSocket() local
208 if (socket_fd < 1) { in ConnectToSocket()
226 int result = connect(socket_fd, (struct sockaddr*)&serv_addr, sizeof(serv_addr)); in ConnectToSocket()
236 int ret = setsockopt(socket_fd, SOL_SOCKET, SO_RCVTIMEO, &socket_timeout, sizeof(socket_timeout)); in ConnectToSocket()
[all …]