/base/startup/appspawn/interfaces/innerkits/client/ |
D | appspawn_socket.cpp | 81 int socketFd = socket(AF_UNIX, SOCK_STREAM, 0); // SOCK_SEQPACKET in CreateSocket() local 82 APPSPAWN_CHECK(socketFd >= 0, return -errno, "Failed to create socket: %{public}d", errno); in CreateSocket() 85 int ret = setsockopt(socketFd, IPPROTO_TCP, TCP_NODELAY, (char *)&flag, sizeof(int)); in CreateSocket() 86 APPSPAWN_LOGV("Created socket with fd %{public}d, setsockopt %{public}d", socketFd, ret); in CreateSocket() 87 return socketFd; in CreateSocket() 90 void AppSpawnSocket::CloseSocket(int &socketFd) in CloseSocket() argument 92 if (socketFd >= 0) { in CloseSocket() 93 APPSPAWN_LOGV("Closed socket with fd %{public}d", socketFd); in CloseSocket() 95 setsockopt(socketFd, IPPROTO_TCP, TCP_NODELAY, (char *)&flag, sizeof(int)); in CloseSocket() 96 close(socketFd); in CloseSocket() [all …]
|
/base/startup/appspawn/test/unittest/app_spawn_socket_test/ |
D | app_spawn_socket_test.cpp | 62 auto socketFd = appSpawnSocket->CreateSocket(); variable 63 EXPECT_LE(0, socketFd); 64 appSpawnSocket->CloseSocket(socketFd); 65 EXPECT_EQ(-1, socketFd); 85 int32_t socketFd = -2; variable 86 appSpawnSocket->CloseSocket(socketFd); 88 EXPECT_EQ(-2, socketFd); 171 int32_t socketFd = -1; variable 176 EXPECT_EQ(-1, appSpawnSocket->ReadSocketMessage(socketFd, buff.get(), len)); 195 auto socketFd = appSpawnSocket->CreateSocket(); variable [all …]
|
/base/startup/appspawn/interfaces/innerkits/include/ |
D | appspawn_socket.h | 65 virtual int ReadSocketMessage(int socketFd, void *buf, int len); 76 virtual int WriteSocketMessage(int socketFd, const void *buf, int len); 83 static void CloseSocket(int &socketFd);
|
/base/hiviewdfx/hilog/frameworks/libhilog/base/ |
D | hilog_base.cpp | 41 std::atomic_int socketFd {INVALID_SOCKET}; member 45 int currentFd = socketFd.exchange(INVALID_SOCKET); in ~SocketHandler() 135 int currentFd = socketHandler.socketFd.load(); in CheckSocket() 147 if (!socketHandler.socketFd.compare_exchange_strong(currentFd, fd)) { in CheckSocket() 166 auto result = TEMP_FAILURE_RETRY(connect(socketHandler.socketFd.load(), in CheckConnection() 248 return TEMP_FAILURE_RETRY(::writev(socketHandler.socketFd.load(), vec, vecSize)); in SendMessage()
|
/base/startup/appspawn/test/unittest/client_socket_test/ |
D | client_socket_test.cpp | 64 int32_t socketFd = clientSocket->GetSocketFd(); variable 66 EXPECT_EQ(socketFd, clientSocket->GetSocketFd()); 303 int32_t socketFd = clientSocket->GetSocketFd(); variable 305 EXPECT_EQ(socketFd, clientSocket->GetSocketFd());
|
/base/hiviewdfx/faultloggerd/services/ |
D | fault_logger_daemon.h | 36 void HandleAccept(int32_t epollFd, int32_t socketFd);
|
D | fault_logger_daemon.cpp | 129 void FaultLoggerDaemon::HandleAccept(int32_t epollFd, int32_t socketFd) in HandleAccept() argument 134 …int connectionFd = accept(socketFd, reinterpret_cast<struct sockaddr *>(&clientAddr), &clientAddrS… in HandleAccept() 141 connectionMap_.insert(std::pair<int32_t, int32_t>(connectionFd, socketFd)); in HandleAccept()
|
/base/msdp/device_status/services/communication/client/src/ |
D | devicestatus_srv_proxy.cpp | 413 int32_t &socketFd, int32_t &tokenType) in AllocSocketFd() argument 433 socketFd = reply.ReadFileDescriptor(); in AllocSocketFd() 434 if (socketFd < RET_OK) { in AllocSocketFd() 435 FI_HILOGE("Read file descriptor failed, fd:%{public}d", socketFd); in AllocSocketFd() 439 FI_HILOGD("socketFd:%{public}d, tokenType:%{public}d", socketFd, tokenType); in AllocSocketFd()
|
/base/msdp/device_status/services/communication/base/ |
D | i_devicestatus.h | 56 int32_t &socketFd, int32_t &tokenType) = 0;
|
/base/msdp/device_status/services/communication/client/include/ |
D | devicestatus_srv_proxy.h | 41 int32_t &socketFd, int32_t &tokenType) override;
|