Comments (8)
是长连接。但心跳包由上层应用来发,因为每种应用的tcp协议可能不一样。
from evpp.
再问个事情,发生消息和接收消息时,是否可以设置偏移字节
from evpp.
很抱歉,没明白。请给出具体的代码片段,和你希望的使用方式。
from evpp.
我就想问问在这个框架下如何处理粘包和拆包
from evpp.
必然框架自己处理好了啊。上层应用无需关心。
from evpp.
收包时,evpp会把数据包缓存到 TCPConn::input_buffer_
中,发包时,如果数据没有完全发送完,会顺序缓存到 TCPConn::input_buffer_
中,当下次可写事件到来时,优先发送之前缓存的数据。
from evpp.
包头是否有记录包的大小?
from evpp.
这是上层应用层的TCP协议的事情,不该evpp
库负责。每种TCP协议都不一样。例如http1.x和http2的协议就不一样,其记录TCP包大小的方式就不一样。
from evpp.
Related Issues (20)
- Bug in example UDP echo server
- whether evpp::TCPConnPtr is thread safe or not?
- MFC程序下 eventloop直接报错
- 有实现SSL TCP通信的吗
- EventLoop.Run函数底层会创建很多线程嘛 HOT 1
- Evpp failed to build with error LNK1181 on MSVC
- is this project still active? HOT 1
- example_evpphttp_server, server not init HOT 1
- The echo UDP server example does not compile against package installed by vcpkg. HOT 3
- evpp支持同时监听ipv6和ipv4吗?支持的话如何开启?
- Potential memory leak in benchmark/throughput/libevent/client.c
- Potential memory leak in benchmark/throughput/libevent/server.c
- Potential memory leak in benchmark/http/libevent/libevent_http_bench.c
- Potential memory leak in benchmark/throughput/libevent/client.c
- Potential memory leak in benchmark/throughput/libevent/server.c
- Potential memory leak in benchmark/http/libevent/libevent_http_bench.c
- Potential memory leak in apps/evmc/extract_vbucket_conf.cc HOT 1
- Potential memory leak in test/evhttp_client_test.cc HOT 1
- ASan heap-use-after-free in tcpserver tests
- TCPServer 的 thread_num 有什么作用 ? ,为什么要建立多个 EventLoopThreadPool ? 1 和 4 有什么区别吗? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from evpp.