udp - Python - Is sendto()'s return value useless? -
in recent project, need use udp protocol transmit data. if send data using size = s.sendto(data, (<addr>, <port>))
, udp protocol ensure data packed 1 udp packet? if so, size == len(data)
true
? there misunderstood?
more precisely, 'sendto()' split data several smaller chunks , pack each chunk udp packet transimit?
the length of udp packet limited. if data large, return value can't equal length.there situations, such not enough send buffer, network fault. size means bytes have been sent send buffer.
Comments
Post a Comment