It has a parameter called backlog and it limits the maximum length of queue of pending list.
If I set backlog to 128, is it means no more than 128 packets can be handled by server?
If I have three computers and each of them send 40-50 packets to the server, the total number will over the limitation of backlog; is it same as a computer send 2xx packets to server?
And then, how to handle the exception on client that the limit of backlog reached in the server?
Since I have a testing:
1. PCA sends packets to PCA itself, said sends 1024 packets at a time, each packet contains 34 bytes.
2. PCA has both receiver and sender.
3. PCA send a order number to the reciever.
4. But sometimes, receiver received extra packets (1 or 2 more).
5. Once an extra message is received, the data received will like this:
rather than
Can you problem me a direction that how client knows the server has been reach the limit of backlog?
The structure of sender.
The structure of receiver:
It has a parameter called backlog and it limits the maximum length of queue of pending list.
If I set backlog to 128, is it means no more than 128 packets can be handled by server?
No, it means that no more than 128 pending connections can be waiting at once. 128 people somewhere on the internet that are doing connect(my_fd, your_server); and the server has told them "OK, wait in line".
Quote:
Can you problem me a direction that how client knows the server has been reach the limit of backlog?
I think the client will just get "connection refused" when the server already has the maximum number of pending connections waiting. Note that this is pending connections: It won't limit established connections for you, you have to do that yourself.
If the problem does not related with the listen(), it may be an interesting thing.
I sent 1024 packets to the server (a PC has both sender and receiver, that means, it send packets to itself).
When I Ctrl+C to close and reopen the program few times, the receiver may receive extra package and garbage; and some packets are missing.
If I send 65535 packets at a time, this problem happens more frequency.
Hello Everyone,
I am new to awk and trying my hand with the diff codes and came across the below code today. It would be great if any of the Guru's help me to understand.
awk '{filename = "sample_file" int((NR-1)/34) ".DAT"; print >> filename}' sample_file.DAT
34 is the no of lines each... (7 Replies)
A simple arithmetic example: 1680 / 1.12 = 1500
My C code result is 1499, here is the code:
#include <stdio.h>
main(int argc, char *argv)
{
int t = 1680;
double adj = 1.12;
int ires = t / adj;
double fres = t / adj;
... (8 Replies)
int air_date='20100103'; //2010 - Jan - 03
/* My goal here is to subtract a day. */
int day = air_date % 100; //?????? Is this right?
//Are there any functions time/date for this type of date format?
:cool: (7 Replies)
hello guys i m new to shell scripting and can't find out why this structure is not right
I m guessing this happens because $LINESUM is a string . so how can i do this ?
i want my script to do so many loops as the number of the lines of one custom file.
#!/bin/bash
echo give me path name... (5 Replies)
hello everybody!
I want to create a file with permissions for read, write, and execute to everybody using C, so I write this code:
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
int main(){
int fileDescriptor;
fileDescriptor =... (2 Replies)
Hi,
Is there any way to calculate the size of a built in data type without using 'sizeof' operator? I also don't have the option to read it from std .h file.
regards
Apoorva Kumar (10 Replies)
I am working on a re-engineering project. Original Code is written in C. In the C code some "forms" are being called. Each form is in a separate file and files are tagged "int" or "int.lst" like f00.int, f00.int.lst
Can some body through some light on what are these files and what is the... (2 Replies)
How can I store and/or print() a number that is larger than 4 294 967 295 in C? is int64_t or u_int64_t what I need ? if, so how can I printf it to stdout? (2 Replies)