Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I have a traffic capture from what I believe is a windows client. I've noticed that from time to time it sends what are identified by Wireshark as "TCP Keep-Alive", but instead of just setting ACK and sending no data, it backs up SEQ by one octet and resends that data.
(C = client, S = server, relative seq / ack)
(connected, data transferred back and forth)
1 C: PSH Seq=21, Ack=41, Len=12
2 S: PSH ACK Seq=41, Ack=33, Len=12
3 C: ACK Seq=33, Ack=53
4 S: PSH ACK Seq=53, Ack=33, Len=1
5 C: ACK Seq=33, Ack=54
... 3 seconds pass ...
6 C: ACK Seq=32, Ack=54, Len=1 (resends the last octet from #1)
7 S: ACK Seq=54, Ack=33
...
Is this the normal behaviour for the windows stack when sending TCP keepalives?
That's what a keep-alive segment is. It isn't a separate piece of protocol, it's just a redundant send with a sequence number that has already been acknowledged, to provoke an ACK with the current sequence number in reply. There's no requirement that it set the PSH flag either.
Related
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 1 year ago.
Improve this question
I need to run my Co program continuously with five minute interval.
I tried using gocron but the program is not giving any output.
func hi() {
fmt.Println("hi")
}
func main() {
gocron.Every(5).Minute().Do(hi)
}
I expect this to run and print "hi" at every 5 min interval.
Your code is only setup a rule and immediately exits. You have to start the scheduler which will run the assigned jobs.
scheduler := gocron.NewScheduler(time.UTC)
scheduler.Every(5).Minute().Do(hi)
scheduler.StartBlocking()
This way the scheduler will block the program until its stopped (by Ctrl-C for example).
See the documentation for more info.
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 2 years ago.
Improve this question
what wrong with that ? I wanna del redis key in laravel but it doesn't work .it return queue statusenter image description here
queued response is used in redis transactions. When you start a transaction with multi every command you execute will be queued until you exec it.
> MULTI
OK
> INCR foo
QUEUED
> INCR bar
QUEUED
> EXEC
1) (integer) 1
2) (integer) 1
Probably in your code, exec part is missing or you may remove multi before executing your command.
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 3 years ago.
Improve this question
I wrote a pool of workers, where the job is to receive an integer and return that number converted to string. However I faced a fatal error: all goroutines are asleep - deadlock! error. What am I doing wrong and how can I fix it?
https://play.golang.org/p/U814C2rV5na
I was able to replicate your issue and fix it by using a pointer to master instead of a normal variable.
Basically just change your NewWorker() method to this:
func (m *Master) NewWorker() {
m.Workers = append(m.Workers, Worker{})
}
Here's the output the program prints after the change:
0
1
2
3
4
5
6
7
8
9
10
.
.
.
Reason:
Everytime you called NewWorker() method, you weren't appending a worker to the same master object. That's why the slice never got populated with 3 workers, as should've been the case.
Go Playground
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
The community reviewed whether to reopen this question 7 months ago and left it closed:
Original close reason(s) were not resolved
Improve this question
Below two issues I was facing while trying to create ftps connection.
421 Sorry, cleartext sessions are not accepted on this server.
Uncaught No protocol found in connection credential
It was solved after some config changes, which I'm putting in the answer. Same should work for ftpes.
Tried this and worked (see "secure" and "secureOptions" specifically):
{
"protocol": "ftp",
"host": "***FTP_HOSTNAME_HERE***",
"port": 21,
"user": "***YOUR_USERNAME_HERE***",
"pass": "***YOUR_PASSWORD_HERE***",
"promptForPass": false,
"remote": "***REMOTE_PATH_HERE***",
"secure": true,
"secureOptions": {"rejectUnauthorized": false, "requestCert": true, "agent": false},
"connTimeout": 10000, // integer - How long (in milliseconds) to wait for the control connection to be established. Default: 10000
"pasvTimeout": 10000, // integer - How long (in milliseconds) to wait for a PASV data connection to be established. Default: 10000
"keepalive": 10000, // integer - How often (in milliseconds) to send a 'dummy' (NOOP) command to keep the connection alive. Default: 10000
"watch":[]
}
Note that "protocol" should always be "ftp" for ftp/ftps/ftpes.
I am new to NTP protocol. I read the RFC1305 and have some questions about NTP.
My questions are related to NTP working modes.
According to RFC1305 there are 8 modes
| 0 | reserved
| 1 | symmetric active
| 2 | symmetric passive
| 3 | client
| 4 | server
| 5 | broadcast
| 6 | NTP control message
| 7 | reserved for private use
My questions:
1- What are the differences between the symmetric passive device and symmetric active one?
2- Two symmetric active device can sync each other and Two passive active device can sync each other too ,but Can a symmetric passive device been synced by a symmetric active one and vice versa?
3- When a Symmetric passive device is connected to symmetric active one which one sends the NTP packet first?
4- What happens in broadcasting mode? Does the client send any NTP packet or only the broadcaster does that?
5- ”in order to sync some clients who have CLASS D IP ‘s , the server fills the 3 time stamp fields(receive time stamp is null) and set the mode to 5 and send the packet to 224.0.1.1 and clients get that packet and they send nothing in this procedure” Is this true?
6- Who sends the NTP control message? Client or broadcaster? What’s it for? What’s the appropriate answer for it?is it always 12 bytes long?
7- “A stratum 1 NTP server (GPS connected) acts like this: answer mode 1 requests with mode 2, mode 3 with mode 4 and mode 6 with 7” Is this true?
can only reply to a few questions:
-4. only the server (broadcaster) is allowed to send any ntp-packet in this mode
clients only listen to the interface, parse the received packet and set their clock accordingly - there is no reply being send.
but clients may send a ntp-request too, the server should then not reply to this one.
-5. right. there is no answer supposed to be send by this clients.
Mode 6 is used by the ntpq program. It can for example query "a list of the peers known to the server as well as a summary of their state" (from the man page).
This has recently be exploited to do DDOS reflection attacks, because it can be triggered with spoofed IP address, and the reply is larger than the query. 1
For this reason mode 6 and 7 queries should be blocked from outside sources.