Comments (3)
Pease define the meaning of ‘receive many messages’. Is the message length evaluated at runtime in the server side?
Based on your description, I assume you should use photon::rpc, which will allow you to extend response buffer dynamically.
The client will block on rpc request function on a specific coroutine, until the server responds.
from photonlibos.
Thanks for the reply, I will take a look at the rpc implementation.
from photonlibos.
The TCP server (B) is working. It can receive message and write many messages back.
The Client (A) can sent a message and receive multiple messages.
However I don't know how to implement the client in such a way that it is just a function that will terminate the connection and return to the calling function.
You can terminate the connection by close()ing it or by just delete -ing the socket, then return.
how to do this asynchronously with PhotonLibOS
if you want to make this function asynchronous, you can create a new thread with thread_create() and let it run the function you have already implemented.
from photonlibos.
Related Issues (20)
- Macos构建失败 HOT 2
- Compare with seastar ? HOT 2
- update benchmark result(asyncio) HOT 5
- Purpose of asymmetric_spinLock HOT 6
- 协程栈分配优化问题 HOT 2
- photon stack 有支持spdk的blobfs计划吗 HOT 4
- Creating and joining a number of threads only known at runtime HOT 22
- IOURING and EchoServer fails : free() Invalid Pointer HOT 18
- Repeated Timer and async_run HOT 5
- IO_Uring send: Broken pipe HOT 7
- More examples / documentation on Photon Filesystem HOT 3
- Phonton Threads NOT working HOT 14
- PhotonLib crashes with other thread models HOT 4
- Photon Threads Affinity HOT 13
- Any plans on roadmap to add support for DPDK blobfs/blobstore HOT 14
- Socket recv_errqueue:deferred copy occurs message HOT 6
- Is there a way to call `photon::thread_create11()` from C by using a void* function pointer? HOT 8
- Is it possible to use libc functions for networking and IO with Photon coroutines? HOT 18
- Making Photon work with GC HOT 10
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 photonlibos.