Forum > Packages and Libraries

synapse setLinger(?)

(1/1)

senglit:
hi all,

I am curious about setLinger in synapse. It is explained as: Sets linger. Enabled linger means that the system waits another LINGER (in milliseconds) time for delivery of sent data. This function is only for stream type of socket! (TCP)

There are my questions:
1. Why need to wait a while to send another package? Is it for the purpose of helping the reciever to avoid get data like "one and a half package"?
2. in the sysnapse echo server demo why does it setLinger(true,10000) to set the wait time to 10 seconds? That's a very long time!

PascalDragon:
This is nothing specific to Synapse, but a general functionality of sockets, so you can inform yourself about it with a general search on the internet. For example here.

howardpc:
@theo
Great to see you active again.

senglit:
Understood. Thanks!


--- Quote from: PascalDragon on October 25, 2022, 07:10:00 am ---This is nothing specific to Synapse, but a general functionality of sockets, so you can inform yourself about it with a general search on the internet. For example here.

--- End quote ---

Navigation

[0] Message Index

Go to full version