Home
last modified time | relevance | path

Searched refs:socketFd (Results 1 – 10 of 10) sorted by relevance

/base/startup/appspawn/interfaces/innerkits/client/
Dappspawn_socket.cpp81 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/
Dapp_spawn_socket_test.cpp62 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/
Dappspawn_socket.h65 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/
Dhilog_base.cpp41 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/
Dclient_socket_test.cpp64 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/
Dfault_logger_daemon.h36 void HandleAccept(int32_t epollFd, int32_t socketFd);
Dfault_logger_daemon.cpp129 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/
Ddevicestatus_srv_proxy.cpp413 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/
Di_devicestatus.h56 int32_t &socketFd, int32_t &tokenType) = 0;
/base/msdp/device_status/services/communication/client/include/
Ddevicestatus_srv_proxy.h41 int32_t &socketFd, int32_t &tokenType) override;