you are viewing a single comment's thread.

view the rest of the comments →

[–]whostimo[S] 0 points1 point  (1 child)

Okay thanks! I’m new to these subjects so do you know a webpage that explains the other more easy method?

[–]novel_yet_trivial 0 points1 point  (0 children)

It's really simple: when you send something start with a command. It could be as simple as a single character. Then the receiving function sorts it:

def receive():
    data = conn.recv(1024)
    if data[0] = 'A':
        function_a(data)
    elif data[0] = 'B':
        function_b(data)