title: Send Integers across sockets python
body: <p>I have an integer, which i want to send across from a socket to another in python. Lets say this integer a=2. How do i send this integer across to a socket over a connection. 
  Currently, i have done the following code:</p>
  
  <pre><code>server_socket.send(str(a))         #Server side
  
  
  b=int(client_socket.recv(512))        #Client side
  </code></pre>
  
  <p>but the call to int() gives me error, saying that its not of valid length. i am basically not getting what argument to put in the recv() method.</p>