Explore Enterprise Education Gitee Premium Gitee AI AI teammates
Fetch the repository succeeded.
Donate
Please sign in before you donate.
Scan WeChat QR to Pay
Cancel
Complete
Prompt
Switch to Alipay.
OK
Cancel
1 Star 0 Fork 644

fate-intel/HP-Socket

Create your Gitee Account
Explore and code with more than 14 million developers,Free private repositories !:)
Sign up
Already have an account? Sign in
文件
dev
Branches (2)
Tags (16)
dev
master
v6.0.1
v5.9.5
v5.9.4
v5.9.3
v5.9.2
v5.9.1
v5.8.8
v5.8.7
v5.8.6
v5.8.5
v5.8.4
v5.8.3
v5.8.2
v5.8.1
v5.7.3
v5.7.2
dev
Branches (2)
Tags (16)
dev
master
v6.0.1
v5.9.5
v5.9.4
v5.9.3
v5.9.2
v5.9.1
v5.8.8
v5.8.7
v5.8.6
v5.8.5
v5.8.4
v5.8.3
v5.8.2
v5.8.1
v5.7.3
v5.7.2
Clone or Download
Clone/Download
Prompt
To download the code, please copy the following command and execute it in the terminal
To ensure that your submitted code identity is correctly recognized by Gitee, please execute the following command.
When using the SSH protocol for the first time to clone or push code, follow the prompts below to complete the SSH configuration.
1 Generate RSA keys.
2 Obtain the content of the RSA public key and configure it in SSH Public Keys
To use SVN on Gitee, please visit the usage guide
When using the HTTPS protocol, the command line will prompt for account and password verification as follows. For security reasons, Gitee recommends configure and use personal access tokens instead of login passwords for cloning, pushing, and other operations.
Username for 'https://gitee.com': userName
Password for 'https://userName@gitee.com': # Private Token
dev
Branches (2)
Tags (16)
dev
master
v6.0.1
v5.9.5
v5.9.4
v5.9.3
v5.9.2
v5.9.1
v5.8.8
v5.8.7
v5.8.6
v5.8.5
v5.8.4
v5.8.3
v5.8.2
v5.8.1
v5.7.3
v5.7.2
HP-Socket
/
Linux
/
src
/
UdpCast.cpp
HP-Socket
/
Linux
/
src
/
UdpCast.cpp
UdpCast.cpp 13.64 KB
Copy Edit Raw Blame History
伤神小怪兽 authored 2024年01月03日 14:00 +08:00 . 20240103
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701
/*
* Copyright: JessMA Open Source (ldcsaa@gmail.com)
*
* Author : Bruce Liang
* Website : https://github.com/ldcsaa
* Project : https://github.com/ldcsaa/HP-Socket
* Blog : http://www.cnblogs.com/ldcsaa
* Wiki : http://www.oschina.net/p/hp-socket
* QQ Group : 44636872, 75375912
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "UdpCast.h"
#ifdef _UDP_SUPPORT
BOOL CUdpCast::Start(LPCTSTR lpszRemoteAddress, USHORT usPort, BOOL bAsyncConnect, LPCTSTR lpszBindAddress, USHORT usLocalPort)
{
ASSERT(usLocalPort == 0);
if(!CheckParams() || !CheckStarting())
return FALSE;
PrepareStart();
m_ccContext.Reset();
BOOL isOK = FALSE;
HP_SOCKADDR bindAddr(AF_UNSPEC, TRUE);
if(CreateClientSocket(lpszRemoteAddress, usPort, lpszBindAddress, bindAddr))
{
if(BindClientSocket(bindAddr))
{
if(TRIGGER(FirePrepareConnect(m_soClient)) != HR_ERROR)
{
if(ConnectToGroup(bindAddr))
{
if(CreateWorkerThread())
{
isOK = TRUE;
}
else
SetLastError(SE_WORKER_THREAD_CREATE, __FUNCTION__, ERROR_CREATE_FAILED);
}
else
SetLastError(SE_CONNECT_SERVER, __FUNCTION__, ::WSAGetLastError());
}
else
SetLastError(SE_SOCKET_PREPARE, __FUNCTION__, ENSURE_ERROR_CANCELLED);
}
else
SetLastError(SE_SOCKET_BIND, __FUNCTION__, ::WSAGetLastError());
}
else
SetLastError(SE_SOCKET_CREATE, __FUNCTION__, ::WSAGetLastError());
if(!isOK)
{
m_ccContext.Reset(FALSE);
EXECUTE_RESTORE_ERROR(Stop());
}
return isOK;
}
BOOL CUdpCast::CheckParams()
{
if (((int)m_dwMaxDatagramSize > 0 && m_dwMaxDatagramSize <= MAXIMUM_UDP_MAX_DATAGRAM_SIZE) &&
((int)m_dwFreeBufferPoolSize >= 0) &&
((int)m_dwFreeBufferPoolHold >= 0) &&
(m_enCastMode >= CM_MULTICAST && m_enCastMode <= CM_BROADCAST) &&
(m_iMCTtl >= 0 && m_iMCTtl <= 255) &&
(m_bMCLoop == TRUE || m_bMCLoop == FALSE) )
return TRUE;
SetLastError(SE_INVALID_PARAM, __FUNCTION__, ERROR_INVALID_PARAMETER);
return FALSE;
}
void CUdpCast::PrepareStart()
{
m_itPool.SetItemCapacity(m_dwMaxDatagramSize);
m_itPool.SetPoolSize(m_dwFreeBufferPoolSize);
m_itPool.SetPoolHold(m_dwFreeBufferPoolHold);
m_itPool.Prepare();
}
BOOL CUdpCast::CheckStarting()
{
CSpinLock locallock(m_csState);
if(m_enState == SS_STOPPED)
m_enState = SS_STARTING;
else
{
SetLastError(SE_ILLEGAL_STATE, __FUNCTION__, ERROR_INVALID_STATE);
return FALSE;
}
return TRUE;
}
BOOL CUdpCast::CheckStoping()
{
if(m_enState != SS_STOPPED)
{
CSpinLock locallock(m_csState);
if(HasStarted())
{
m_enState = SS_STOPPING;
return TRUE;
}
}
SetLastError(SE_ILLEGAL_STATE, __FUNCTION__, ERROR_INVALID_STATE);
return FALSE;
}
BOOL CUdpCast::CreateClientSocket(LPCTSTR lpszRemoteAddress, USHORT usPort, LPCTSTR lpszBindAddress, HP_SOCKADDR& bindAddr)
{
HP_SCOPE_HOST host(lpszRemoteAddress);
LPCTSTR lpszRealAddress = host.addr;
if(m_enCastMode == CM_BROADCAST && ::IsStrEmpty(lpszRealAddress))
lpszRealAddress = DEFAULT_IPV4_BROAD_CAST_ADDRESS;
if(!::GetSockAddrByHostName(lpszRealAddress, usPort, m_castAddr))
return FALSE;
if(::IsStrEmpty(lpszBindAddress))
{
bindAddr.family = m_castAddr.family;
bindAddr.SetPort(usPort);
}
else
{
if(!::sockaddr_A_2_IN(lpszBindAddress, usPort, bindAddr))
return FALSE;
}
if(m_enCastMode == CM_BROADCAST && bindAddr.IsIPv6())
{
::WSASetLastError(ERROR_PFNOSUPPORT);
return FALSE;
}
if(m_castAddr.family != bindAddr.family)
{
::WSASetLastError(ERROR_AFNOSUPPORT);
return FALSE;
}
m_soClient = socket(m_castAddr.family, SOCK_DGRAM, IPPROTO_UDP);
if(m_soClient == INVALID_SOCKET)
return FALSE;
VERIFY(::fcntl_SETFL(m_soClient, O_NOATIME | O_NONBLOCK | O_CLOEXEC));
VERIFY(::SSO_ReuseAddress(m_soClient, m_enReusePolicy) == NO_ERROR);
SetRemoteHost(host.name, usPort);
return TRUE;
}
BOOL CUdpCast::BindClientSocket(HP_SOCKADDR& bindAddr)
{
HP_SOCKADDR anyAddr = HP_SOCKADDR::AnyAddr(m_castAddr.family);
anyAddr.SetPort(m_castAddr.Port());
if(::bind(m_soClient, anyAddr.Addr(), anyAddr.AddrSize()) == SOCKET_ERROR)
return FALSE;
m_dwConnID = ::GenerateConnectionID();
return TRUE;
}
BOOL CUdpCast::ConnectToGroup(const HP_SOCKADDR& bindAddr)
{
if(m_enCastMode == CM_MULTICAST)
{
if(!::SetMultiCastSocketOptions(m_soClient, bindAddr, m_castAddr, m_iMCTtl, m_bMCLoop))
return FALSE;
}
else
{
ASSERT(m_castAddr.IsIPv4());
UINT iSet = 1;
VERIFY(::SSO_SetSocketOption(m_soClient, SOL_SOCKET, SO_BROADCAST, &iSet, sizeof(UINT)) != SOCKET_ERROR);
}
SetConnected();
if(TRIGGER(FireConnect()) == HR_ERROR)
{
::WSASetLastError(ENSURE_ERROR_CANCELLED);
return FALSE;
}
m_nEvents = (SHORT)((m_lsSend.IsEmpty() ? 0 : POLLOUT) | (m_bPaused ? 0 : POLLIN) | POLLRDHUP);
return TRUE;
}
BOOL CUdpCast::Stop()
{
if(!CheckStoping())
return FALSE;
WaitForWorkerThreadEnd();
SetConnected(FALSE);
if(m_ccContext.bFireOnClose)
FireClose(m_ccContext.enOperation, m_ccContext.iErrorCode);
if(m_soClient != INVALID_SOCKET)
{
shutdown(m_soClient, SHUT_WR);
closesocket(m_soClient);
m_soClient = INVALID_SOCKET;
}
Reset();
return TRUE;
}
void CUdpCast::Reset()
{
CCriSecLock locallock(m_csSend);
m_evSend.Reset();
m_evRecv.Reset();
m_evStop.Reset();
m_lsSend.Clear();
m_itPool.Clear();
m_rcBuffer.Free();
m_castAddr.Reset();
m_remoteAddr.Reset();
m_strHost.Empty();
m_usPort = 0;
m_nEvents = 0;
m_bPaused = FALSE;
m_enState = SS_STOPPED;
m_evWait.SyncNotifyAll();
}
void CUdpCast::WaitForWorkerThreadEnd()
{
if(!m_thWorker.IsRunning())
return;
if(m_thWorker.IsInMyThread())
m_thWorker.Detach();
else
{
m_evStop.Set();
m_thWorker.Join();
}
}
BOOL CUdpCast::CreateWorkerThread()
{
return m_thWorker.Start(this, &CUdpCast::WorkerThreadProc);
}
UINT WINAPI CUdpCast::WorkerThreadProc(LPVOID pv)
{
::SetCurrentWorkerThreadName();
TRACE("---------------> Cast Worker Thread 0x%08X started <---------------", SELF_THREAD_ID);
OnWorkerThreadStart(SELF_THREAD_ID);
BOOL bCallStop = TRUE;
pollfd pfds[] = { {m_soClient, m_nEvents},
{m_evSend.GetFD(), POLLIN},
{m_evRecv.GetFD(), POLLIN},
{m_evStop.GetFD(), POLLIN} };
int size = ARRAY_SIZE(pfds);
m_rcBuffer.Malloc(m_dwMaxDatagramSize);
while(HasStarted())
{
int rs = (int)::PollForMultipleObjects(pfds, size);
ASSERT(rs > TIMEOUT);
if(rs <= 0)
{
m_ccContext.Reset(TRUE, SO_UNKNOWN, ::WSAGetLastError());
goto EXIT_WORKER_THREAD;
}
for(int i = 0; i < size; i++)
{
if((1 << i) & rs)
{
SHORT revents = pfds[i].revents;
if(i == 0)
{
if(!ProcessNetworkEvent(revents))
goto EXIT_WORKER_THREAD;
}
else if(i == 1)
{
m_evSend.Reset();
if(!SendData())
goto EXIT_WORKER_THREAD;
}
else if(i == 2)
{
m_evRecv.Reset();
if(!ReadData())
goto EXIT_WORKER_THREAD;
}
else if(i == 3)
{
m_evStop.Reset();
bCallStop = FALSE;
goto EXIT_WORKER_THREAD;
}
else
VERIFY(FALSE);
}
}
m_nEvents = (SHORT)((m_lsSend.IsEmpty() ? 0 : POLLOUT) | (m_bPaused ? 0 : POLLIN) | POLLRDHUP);
pfds[0].events = m_nEvents;
}
EXIT_WORKER_THREAD:
OnWorkerThreadEnd(SELF_THREAD_ID);
if(bCallStop && HasStarted())
Stop();
TRACE("---------------> Cast Worker Thread 0x%08X stoped <---------------", SELF_THREAD_ID);
return 0;
}
BOOL CUdpCast::ProcessNetworkEvent(SHORT events)
{
ASSERT(IsConnected());
BOOL bContinue = TRUE;
if(bContinue && events & POLLERR)
bContinue = HandleClose(events);
if(bContinue && events & POLLIN)
bContinue = HandleRead(events);
if(bContinue && events & POLLOUT)
bContinue = HandleWrite(events);
if(bContinue && events & _POLL_HUNGUP_EVENTS)
bContinue = HandleClose(events);
return bContinue;
}
BOOL CUdpCast::HandleClose(SHORT events)
{
EnSocketOperation enOperation = SO_CLOSE;
if(events & _POLL_HUNGUP_EVENTS)
enOperation = SO_CLOSE;
else if(events & POLLIN)
enOperation = SO_RECEIVE;
else if(events & POLLOUT)
enOperation = SO_SEND;
m_ccContext.Reset(TRUE, enOperation, ::SSO_GetError(m_soClient));
return FALSE;
}
BOOL CUdpCast::HandleRead(SHORT events)
{
return ReadData();
}
BOOL CUdpCast::HandleWrite(SHORT events)
{
return SendData();
}
BOOL CUdpCast::ReadData()
{
while(TRUE)
{
if(m_bPaused)
break;
socklen_t addrLen = (socklen_t)m_remoteAddr.AddrSize();
int rc = (int)recvfrom(m_soClient, (char*)(BYTE*)m_rcBuffer, m_dwMaxDatagramSize, MSG_TRUNC, m_remoteAddr.Addr(), &addrLen);
if(rc >= 0)
{
if(rc > (int)m_dwMaxDatagramSize)
{
m_ccContext.Reset(TRUE, SO_RECEIVE, ERROR_BAD_LENGTH);
return FALSE;
}
if(TRIGGER(FireReceive(m_rcBuffer, rc)) == HR_ERROR)
{
TRACE("<C-CNNID: %zu> OnReceive() event return 'HR_ERROR', connection will be closed !", m_dwConnID);
m_ccContext.Reset(TRUE, SO_RECEIVE, ENSURE_ERROR_CANCELLED);
return FALSE;
}
}
else if(rc == SOCKET_ERROR)
{
int code = ::WSAGetLastError();
if(code == ERROR_WOULDBLOCK)
break;
else
{
m_ccContext.Reset(TRUE, SO_RECEIVE, code);
return FALSE;
}
}
else
ASSERT(FALSE);
}
return TRUE;
}
BOOL CUdpCast::PauseReceive(BOOL bPause)
{
if(!IsConnected())
{
::SetLastError(ERROR_INVALID_STATE);
return FALSE;
}
if(m_bPaused == bPause)
return TRUE;
m_bPaused = bPause;
if(!bPause)
return m_evRecv.Set();
return TRUE;
}
BOOL CUdpCast::SendData()
{
BOOL bBlocked = FALSE;
while(m_lsSend.Length() > 0)
{
TItemPtr itPtr(m_itPool);
{
CCriSecLock locallock(m_csSend);
itPtr = m_lsSend.PopFront();
}
if(!itPtr.IsValid())
break;
if(!DoSendData(itPtr, bBlocked))
return FALSE;
if(bBlocked)
{
CCriSecLock locallock(m_csSend);
m_lsSend.PushFront(itPtr.Detach());
break;
}
}
return TRUE;
}
BOOL CUdpCast::DoSendData(TItem* pItem, BOOL& bBlocked)
{
int rc = (int)sendto(m_soClient, (char*)pItem->Ptr(), pItem->Size(), 0, m_castAddr.Addr(), m_castAddr.AddrSize());
if(rc >= 0)
{
ASSERT(rc == pItem->Size());
if(rc == 0)
{
CCriSecLock locallock(m_csSend);
m_lsSend.ReduceLength(1);
}
if(TRIGGER(FireSend(pItem->Ptr(), rc)) == HR_ERROR)
{
TRACE("<C-CNNID: %zu> OnSend() event should not return 'HR_ERROR' !!", m_dwConnID);
ASSERT(FALSE);
}
}
else if(rc == SOCKET_ERROR)
{
int code = ::WSAGetLastError();
if(code == ERROR_WOULDBLOCK)
bBlocked = TRUE;
else
{
m_ccContext.Reset(TRUE, SO_SEND, code);
return FALSE;
}
}
else
ASSERT(FALSE);
return TRUE;
}
BOOL CUdpCast::Send(const BYTE* pBuffer, int iLength, int iOffset)
{
ASSERT(pBuffer && iLength >= 0 && iLength <= (int)m_dwMaxDatagramSize);
int result = NO_ERROR;
if(pBuffer && iLength >= 0 && iLength <= (int)m_dwMaxDatagramSize)
{
if(IsConnected())
{
if(iOffset != 0) pBuffer += iOffset;
TItemPtr itPtr(m_itPool, m_itPool.PickFreeItem());
itPtr->Cat(pBuffer, iLength);
result = SendInternal(itPtr);
}
else
result = ERROR_INVALID_STATE;
}
else
result = ERROR_INVALID_PARAMETER;
if(result != NO_ERROR)
::SetLastError(result);
return (result == NO_ERROR);
}
BOOL CUdpCast::SendPackets(const WSABUF pBuffers[], int iCount)
{
ASSERT(pBuffers && iCount > 0);
if(!pBuffers || iCount <= 0)
return ERROR_INVALID_PARAMETER;
if(!IsConnected())
return ERROR_INVALID_STATE;
int result = NO_ERROR;
int iLength = 0;
int iMaxLen = (int)m_dwMaxDatagramSize;
TItemPtr itPtr(m_itPool, m_itPool.PickFreeItem());
for(int i = 0; i < iCount; i++)
{
int iBufLen = pBuffers[i].len;
if(iBufLen > 0)
{
BYTE* pBuffer = (BYTE*)pBuffers[i].buf;
ASSERT(pBuffer);
iLength += iBufLen;
if(iLength <= iMaxLen)
itPtr->Cat(pBuffer, iBufLen);
else
break;
}
}
if(iLength >= 0 && iLength <= iMaxLen)
result = SendInternal(itPtr);
else
result = ERROR_INCORRECT_SIZE;
if(result != NO_ERROR)
::SetLastError(result);
return (result == NO_ERROR);
}
int CUdpCast::SendInternal(TItemPtr& itPtr)
{
int iPending;
int iBufferSize;
{
CCriSecLock locallock(m_csSend);
if(!IsConnected())
return ERROR_INVALID_STATE;
iPending = m_lsSend.Length();
iBufferSize = itPtr->Size();
m_lsSend.PushBack(itPtr.Detach());
if(iBufferSize == 0) m_lsSend.IncreaseLength(1);
ASSERT(m_lsSend.Length() > 0);
}
if(iPending == 0 && m_lsSend.Length() > 0) m_evSend.Set();
return NO_ERROR;
}
void CUdpCast::SetLastError(EnSocketError code, LPCSTR func, int ec)
{
TRACE("%s --> Error: %d, EC: %d", func, code, ec);
m_enLastError = code;
::SetLastError(ec);
}
BOOL CUdpCast::GetLocalAddress(TCHAR lpszAddress[], int& iAddressLen, USHORT& usPort)
{
ASSERT(lpszAddress != nullptr && iAddressLen > 0);
return ::GetSocketLocalAddress(m_soClient, lpszAddress, iAddressLen, usPort);
}
void CUdpCast::SetRemoteHost(LPCTSTR lpszHost, USHORT usPort)
{
m_strHost = lpszHost;
m_usPort = usPort;
}
BOOL CUdpCast::GetRemoteHost(TCHAR lpszHost[], int& iHostLen, USHORT& usPort)
{
BOOL isOK = FALSE;
if(m_strHost.IsEmpty())
return isOK;
int iLen = m_strHost.GetLength() + 1;
if(iHostLen >= iLen)
{
memcpy(lpszHost, CA2CT(m_strHost), iLen * sizeof(TCHAR));
usPort = m_usPort;
isOK = TRUE;
}
iHostLen = iLen;
return isOK;
}
BOOL CUdpCast::GetRemoteHost(LPCSTR* lpszHost, USHORT* pusPort)
{
*lpszHost = m_strHost;
if(pusPort != nullptr)
*pusPort = m_usPort;
return !m_strHost.IsEmpty();
}
#endif
Loading...
Report
Report success
We will send you the feedback within 2 working days through the letter!
Please fill in the reason for the report carefully. Provide as detailed a description as possible.
Please select a report type
Cancel
Send
误判申诉

此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。

如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。

取消
提交

About

HP-Socket 是一套通用的高性能 TCP/UDP/HTTP 通信框架,包含服务端组件、客户端组件和Agent组件,广泛适用于各种不同应用场景的 TCP/UDP/HTTP 通信系统,提供 C/C++、C#、Delphi、E(易语言)、Java、Python 等编程语言接口。HP-Socket 对通信层实现完全封装,应用程序不必关注通信层的任何细节;HP-Socket 提供基于事件通知模型的 API 接口,能非常简单高效地整合到新旧应用程序中。
Cancel

Releases

No release

Contributors

All

Activities

can not load any more
Edit
About
Homepage
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/githubdby/HP-Socket.git
git@gitee.com:githubdby/HP-Socket.git
githubdby
HP-Socket
HP-Socket
dev
Going to Help Center

Search

Comment
Repository Report
Back to the top
Login prompt
This operation requires login to the code cloud account. Please log in before operating.
Go to login
No account. Register

AltStyle によって変換されたページ (->オリジナル) /