i am new to network programming in python. I wanted to know that what is the maximum size packet we can transmit or receive on python socket? and how to find out it?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The actual amount of data that can be sent in a single packet depends on what the Maximum Transmission Unit (MTU) is for the protocol you’re using. Read the Wikipedia article for more information.
This is generally something you don’t have to worry about, though – if you send a TCP packet that’s too big, the operating system will fragment it (turn it into multiple packets) for you and it will be reassembled at the host.
By the way, Python’s socket library uses the operating system’s sockets, so it’s nothing particular to Python.