Reputation: 81
I am trying to send an ACK with a data payload using the socket library but I cannot understand how to do it.
Is this supported and if not, what are the alternatives?
Upvotes: 0
Views: 4335
Reputation: 81
As my python script was acting as a TCP server, all I had to do is use the socket.send() method to send the data payload.
This is how it looks in wireshark
1st line : script/server is receiving the data from client
2nd line : ack from server
3rd line: script is sending the data payload
4th line: ack from client
Although this is not a data payload in the 1st ACK, the client treated the reply as a successful one.
Upvotes: 0
Reputation: 2177
Take a look at Scapy. You can forge all the packets you want with it and it's a fairly simple API.
Upvotes: 1
Reputation: 143
you can't do this , Socket library uses high level APIs like :
bind()
listen()
accept()
... etc
the acks will be handled for you ,
Upvotes: 0