I need to make a server that recieves and sends single integers using tcp. Socketserver gives me a TypeError if i try to do this. Is there an alternative or do i need to write a server from scratch?
Asked
Active
Viewed 287 times
0
-
why don't you show us some relevant code? socketserver probably wants you to input a string or byte array... so you'll just have to serialize your integer to a byte array! – Daren Thomas May 04 '12 at 12:31
-
you need to serialize your `int` e.g., using `cPickle`. – moooeeeep May 04 '12 at 12:31