I have an array kind of ([1,2,3,4,5,6],[1,2,3,4,5,6])
this. I have to send it over a STREAM/TCP socket in python. Then I have to receive the same array at the receiving end.
The recvfrom() method can be used with an UDP server to receive data from a UDP client or it can be used with an UDP client to receive data from a UDP server.
You can send and receive on the same socket at the same time (via multiple threads). But the send and receive may not actually occur simultaneously, since one operation may block the other from starting until it's done.
You can Serialize the object before sending to socket and at receiving end Deserialize it. Check this
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With