Python Forum
Python:How to read a recived message that idinfies the client Byte by Byte using UDP
Thread Rating:
  • 2 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python:How to read a recived message that idinfies the client Byte by Byte using UDP
#3
import msgpack

id_ = 44
byte2 = 0
data_values = 6000
the_last_4_bytes = 42

package = [id_, byte2, data_values, the_last_4_bytes]
masgpack.packb(package)

# send the data
On the other side:

import msgpack

# receive the UDP datagram
data = msgpack.unpackb(package)
# process the data
msgpack
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply


Messages In This Thread
RE: Python:How to read a recived message that idinfies the client Byte by Byte using UDP - by wavic - Dec-01-2017, 09:47 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  asyncio byte data transfer gary 5 2,265 Nov-18-2022, 02:45 AM
Last Post: Skaperen
  How can i create a server for already existing client using Python? Chapanson 21 7,996 Aug-19-2020, 09:12 AM
Last Post: DeaD_EyE
  Python script multi client server sonra 1 2,548 Mar-24-2020, 03:49 PM
Last Post: Larz60+
  Python server(Django web site)/client(Python app) connection Junior_Pythoneer 5 3,989 Jul-05-2019, 05:41 PM
Last Post: noisefloor
  recive post request from client(browser) python sockets kunz 1 2,871 Dec-13-2018, 12:53 AM
Last Post: kunz
  Sending/Receiving Multiple Message from Server or Client Lyperion 0 10,613 Jul-30-2018, 07:52 AM
Last Post: Lyperion

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020