0

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?

Megimoo
  • 387
  • 1
  • 3
  • 15
  • 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

1 Answers1

1

struct

Ignacio Vazquez-Abrams
  • 776,304
  • 153
  • 1,341
  • 1,358